Made shellcheck happy
This commit is contained in:
14
install.sh
14
install.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
ENDPOINT="https://git.sassysalamander.net/wytch/recalbox-savesync/archive/main.tar.gz"
|
||||
cd /recalbox/share/system
|
||||
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,12 +10,14 @@ tar -xvf savesync.tar.gz >/dev/null
|
||||
printf "done\n"
|
||||
|
||||
rm savesync.tar.gz
|
||||
cd recalbox-savesync
|
||||
cd recalbox-savesync || { printf "Could not cd into extracted directory. Exiting\n"; exit 1; }
|
||||
|
||||
ans=""
|
||||
while [ ! "$ans" =~ ^[yY][eE]?[sS]?$ ]; do
|
||||
read -p "\nWhat's your rclone prefix? : " prefix
|
||||
re="'^[yY][eE]?[sS]?$'"
|
||||
result="0"
|
||||
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"
|
||||
@@ -27,7 +29,7 @@ mkdir -p /recalbox/share/userscripts/manual
|
||||
cp "locksync.ash" /recalbox/share/userscripts/manual/
|
||||
printf "done\n"
|
||||
printf "Cleaning up..."
|
||||
cd ..
|
||||
cd .. || { printf "failed\nExiting\n"; exit 1; }
|
||||
rm -rf recalbox-savesync
|
||||
printf "done\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user