]> de.git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Require inputting Y to confirm in the Linux script as well, courtesy of Cloudwalk
authorMario <zacjardine@y7mail.com>
Wed, 9 Dec 2020 14:47:11 +0000 (00:47 +1000)
committerMario <zacjardine@y7mail.com>
Wed, 9 Dec 2020 14:47:11 +0000 (00:47 +1000)
misc/tools/rsync-updater/update-to-autobuild.sh
misc/tools/rsync-updater/update-to-release.sh

index 4c66cb58f3751a483a55d58df976fa0dcefefc22..294af5d7815879e27a16bafd8fdd62cbc9aa6c51 100755 (executable)
@@ -9,8 +9,12 @@ if ! which rsync >/dev/null; then
        exit 1
 fi
 
-echo >&2 "This script will DELETE any custom files in the Xonotic folder. Press ENTER to continue, or Ctrl-C to abort."
-read -r DUMMY
+read -rp "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]?" choice
+case "$choice" in
+  Y) ;;
+  y) ;;
+  *) exit 1 ;;
+esac
 
 case "${0##*/}" in
        update-to-autobuild.sh)
index 4c66cb58f3751a483a55d58df976fa0dcefefc22..294af5d7815879e27a16bafd8fdd62cbc9aa6c51 100755 (executable)
@@ -9,8 +9,12 @@ if ! which rsync >/dev/null; then
        exit 1
 fi
 
-echo >&2 "This script will DELETE any custom files in the Xonotic folder. Press ENTER to continue, or Ctrl-C to abort."
-read -r DUMMY
+read -rp "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]?" choice
+case "$choice" in
+  Y) ;;
+  y) ;;
+  *) exit 1 ;;
+esac
 
 case "${0##*/}" in
        update-to-autobuild.sh)