Updated installer once more

This commit is contained in:
2026-02-28 17:33:14 -06:00
parent 88f6d0b05d
commit 0f549a48d5
2 changed files with 44 additions and 32 deletions

View File

@@ -1,7 +1,10 @@
#!/bin/bash
ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz"
cd ~ || { printf "Could not cd to ~. Exiting\n"; exit 1; }
cd ~ || {
printf "Could not cd to ~. Exiting\n"
exit 1
}
printf "Curling tarball..."
curl -L -o savesync.tar.gz "$ENDPOINT" 2>/dev/null
printf "done\n"
@@ -10,17 +13,20 @@ tar -xvf savesync.tar.gz >/dev/null
printf "done\n"
rm savesync.tar.gz
cd recalbox-savesync || { printf "Could not cd into extracted directory. Exiting\n"; exit 1; }
cd recalbox-savesync || {
printf "Could not cd into extracted directory. Exiting\n"
exit 1
}
re="'^[yY][eE]?[sS]?$'"
result="0"
while [ "$result" -ne 1 ]; do
while [ "$result" -ne 1 ]; do
read -rp "\nWhat's your rclone prefix? : " prefix
read -rp "Is $prefix okay? [y/N]: " ans
result="$(grep -E -c "$re" "$ans")"
done
printf "s/<RCLONE_PREFIX>/%s/g" "$prefix" > "/tmp/savesync.sed"
printf "s/<RCLONE_PREFIX>/%s/g" "$prefix" >"/tmp/savesync.sed"
sed -ie "/tmp/savesync.sed" "*.ash"
rm "/tmp/savesync.sed"
printf "Installing scripts...n"
@@ -29,7 +35,10 @@ mkdir -p /recalbox/share/userscripts/manual
cp "locksync.ash" /recalbox/share/userscripts/manual/
printf "done\n"
printf "Cleaning up..."
cd .. || { printf "failed\nExiting\n"; exit 1; }
cd .. || {
printf "failed\nExiting\n"
exit 1
}
rm -rf recalbox-savesync
printf "done\n"