2022-03-27 13:30:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-03-28 13:01:47 +00:00
|
|
|
# if we got the .lock file it means that it's not a first run
|
|
|
|
if [ ! -f ~/retrodeck/.lock ]
|
|
|
|
then
|
|
|
|
mkdir -p ~/retrodeck/.emulationstation
|
|
|
|
mkdir -p ~/retrodeck/saves
|
|
|
|
mkdir -p ~/retrodeck/states
|
|
|
|
mkdir -p ~/retrodeck/screenshots
|
2022-03-29 02:51:22 +00:00
|
|
|
mkdir -p ~/retrodeck/tools
|
2022-03-28 15:00:21 +00:00
|
|
|
mkdir -p /var/config/retroarch/system
|
2022-03-29 02:51:22 +00:00
|
|
|
|
2022-03-28 15:00:21 +00:00
|
|
|
ln -s ~/.var/app/com.xargon.retrodeck/config/retroarch/system/ ~/retrodeck/bios
|
2022-03-28 13:01:47 +00:00
|
|
|
rm -rf ~/retrodeck/.emulationstation/es_settings.xml
|
|
|
|
rm -rf ~/retrodeck/.emulationstation/es_input.xml
|
|
|
|
cp /app/retrodeck/es_settings.xml ~/retrodeck/.emulationstation/es_settings.xml
|
|
|
|
cp /app/retrodeck/es_settings.xml ~/retrodeck/.emulationstation/es_input.xml
|
|
|
|
cp /app/retrodeck/retrodeck-retroarch.cfg /var/config/retroarch/retroarch.cfg
|
2022-03-29 02:51:22 +00:00
|
|
|
cp -r /app/retrodeck/tools/* ~/retrodeck/tools/
|
|
|
|
|
|
|
|
mkdir -p ~/retrodeck/.emulationstation/gamelists/tools/
|
|
|
|
cp /app/retrodeck/tools-gamelist.xml ~/retrodeck/.emulationstation/gamelists/tools/gamelist.xml
|
|
|
|
|
2022-03-28 13:01:47 +00:00
|
|
|
touch ~/retrodeck/.lock
|
2022-03-27 13:30:22 +00:00
|
|
|
fi
|
|
|
|
|
2022-03-28 13:01:47 +00:00
|
|
|
#numFields=$(xmlstarlet sel -t -m '//system' -o "." /app/share/emulationstation/resources/systems/unix/es_systems.xml | wc -c)
|
|
|
|
#for i in $(seq 1 $numFields); do
|
|
|
|
# system=$(xmlstarlet sel -t -m "//system[$i]" -v "name" /app/share/emulationstation/resources/systems/unix/es_systems.xml)
|
|
|
|
# if test -d ~/retrodeck/roms/${system}; then
|
|
|
|
# mkdir -p ~/retrodeck/roms/${system}
|
|
|
|
# fi
|
|
|
|
#done
|
|
|
|
|
|
|
|
emulationstation --home ~/retrodeck/
|