-
Notifications
You must be signed in to change notification settings - Fork 11
/
install_recalbox.sh
31 lines (23 loc) · 1.13 KB
/
install_recalbox.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# script to install crocods on recalbox
# exec it with the command
#
# curl https://raw.githubusercontent.com/redbug26/libretro-crocods/master/install_recalbox.sh | sh
#
#
#CONFIG=es_systems.cfg
CONFIG=/recalbox/share_init/system/.emulationstation/es_systems.cfg
mount -o remount, rw /
# Copy the crocods core in the libretro folder
curl http://www.kyuran.be/wp-content/uploads/2017/02/crocods_libretro.so -o /usr/lib/libretro/crocods_libretro.so
# Add .kcr file extension in emulation station
xml ed -u "/systemList/system[name='amstradcpc']/extension" -v ".dsk .DSK .zip .ZIP .kcr .KCR" $CONFIG >$CONFIG.new
cp $CONFIG.new $CONFIG
# Add crocods core in emulation station if not exist yet
count=`xml sel -t -v "count(/systemList/system[name='amstradcpc']/emulators/emulator/cores[core='crocods'])" $CONFIG`
if [ "$count" == "0" ]; then
xml ed -s "/systemList/system[name='amstradcpc']/emulators/emulator/cores" -t elem -n core -v "crocods" -i core -t attr -n class -v com.foo $CONFIG > $CONFIG.new
cp $CONFIG.new $CONFIG
fi
# Verify the config
#xmlstarlet sel -t -c "/systemList/system[name='amstradcpc']" $CONFIG