From 66b4d3a067f3923683c213f956c2f112ecf076c8 Mon Sep 17 00:00:00 2001 From: wytch Date: Sat, 28 Feb 2026 18:00:17 -0600 Subject: [PATCH] Some gotchas --- install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 }