2022-03-19 21:14:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
|
|
|
|
|
|
|
|
#If JelosAddOns does not exist copy JelosAddOns folder to roms/ports
|
|
|
|
if [ ! -e "/storage/roms/ports/JelosAddOns" ]
|
|
|
|
then
|
|
|
|
cp -r /usr/share/JelosAddOns /storage/roms/ports
|
|
|
|
chmod +x /storage/roms/ports/JelosAddOns -R
|
|
|
|
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Check if gamelist.xml exists, if not create gamelist.xml to hide JelosAddOns by default.
|
|
|
|
if [[ ! -e /storage/roms/ports/gamelist.xml ]];
|
|
|
|
then
|
|
|
|
touch /storage/roms/ports/gamelist.xml
|
|
|
|
cat > /storage/roms/ports/gamelist.xml <<EOF
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<gameList>
|
|
|
|
<game>
|
|
|
|
<path>/storage/roms/ports/JelosAddOns.sh</path>
|
|
|
|
<name>JelosAddOns</name>
|
|
|
|
<hidden>true</hidden>
|
|
|
|
</game>
|
|
|
|
</gameList>
|
|
|
|
EOF
|
|
|
|
|
|
|
|
#If gamelist.xml exists and no JelosAddOns entry exists then add JelosAddOns entry & set to hidden.
|
|
|
|
else
|
|
|
|
if ! grep -R "JelosAddOns" "/storage/roms/ports/gamelist.xml"
|
|
|
|
then
|
|
|
|
sed -i 's|<gameList>|& \
|
|
|
|
<game>\
|
|
|
|
<path>/storage/roms/ports/JelosAddOns.sh</path>\
|
|
|
|
<name>JelosAddOns</name>\
|
|
|
|
<hidden>true</hidden>\
|
|
|
|
</game>|' /storage/roms/ports/gamelist.xml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-07-11 19:33:01 +00:00
|
|
|
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns.sh
|
2022-05-19 19:39:53 +00:00
|
|
|
chmod +x /storage/roms/ports/JelosAddOns/JelosAddOns.sh
|
|
|
|
chmod +x /storage/roms/ports/JelosAddOns -R
|