diff --git a/install.sh b/install.sh index 201fa2b..7589422 100644 --- a/install.sh +++ b/install.sh @@ -18,12 +18,12 @@ cd recalbox-savesync || { exit 1 } -while true -do - read -r -p "What's your rclone prefix? : " prefix - read -r -p "Is $prefix okay? [y/N]: " ans - if [[ "$ans" =~ ^[yY][eE]?[sS]?$ ]]; then break; fi -done +read -p "What's your rclone prefix? : " prefix +read -p "Is $prefix okay? [y/N]: " ans +if [[ ! "$ans" =~ ^[yY][eE]?[sS]?$ ]]; then + printf "Got a negative answer. Exiting\n" + exit 1; +fi touch /tmp/savesync printf "s|RCLONE_PREFIX|%s|\n" "$prefix" >/tmp/savesync @@ -36,7 +36,7 @@ mkdir -p /recalbox/share/userscripts/manual cp "locksync.ash" /recalbox/share/userscripts/manual/ printf "done\n" printf "Cleaning up..." -cd .. { +cd .. || { printf "Could not cd to .. Exiting\n" exit 1 }