RetroPie · GitHub
source link: https://gist.github.com/jbruchanov/45c066c9b22b8abedddd1c1c645ffa09
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
RetroPie · GitHub
Instantly share code, notes, and snippets.
deleteConfig=false params=("$@") if [[ -z "${params[0]}" ]]; then params=(-c "@MOUNT C /home/pi/RetroPie/roms/pc" -c "@C:") elif [[ "${params[0]}" == *.sh ]]; then bash "${params[@]}" exit else file="${params[@]}" folder=${file%/*} configFile="$folder.conf" mapperFile="$folder.map" #echo $file #echo $fileName #echo $folder #echo $configFile #echo $mapperFile if [ -f "$configFile" ]; then params=(-conf $configFile) params+=("$@") elif [ -f "$mapperFile" ]; then echo "Converting global config to specific one!" eval "sed -e 's:mapper-SVN.map:$mapperFile:g' ~/.dosbox/dosbox-SVN.conf >> $configFile" params=(-conf $configFile) params+=("$@") deleteConfig=true fi params+=(-exit) fi
#echo "/opt/retropie/emulators/dosbox/bin/dosbox" "${params[@]}" >> /tmp/test "/opt/retropie/emulators/dosbox/bin/dosbox" "${params[@]}"
if $deleteConfig ; then #echo "DELETING" >> /tmp/test rm "$configFile" fi
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK