From fcc2ceaf755d470795a4712cde695ed19888abb1 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 10 Dec 2020 00:47:11 +1000 Subject: [PATCH] Require inputting Y to confirm in the Linux script as well, courtesy of Cloudwalk --- misc/tools/rsync-updater/update-to-autobuild.sh | 8 ++++++-- misc/tools/rsync-updater/update-to-release.sh | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/misc/tools/rsync-updater/update-to-autobuild.sh b/misc/tools/rsync-updater/update-to-autobuild.sh index 4c66cb58..294af5d7 100755 --- a/misc/tools/rsync-updater/update-to-autobuild.sh +++ b/misc/tools/rsync-updater/update-to-autobuild.sh @@ -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) diff --git a/misc/tools/rsync-updater/update-to-release.sh b/misc/tools/rsync-updater/update-to-release.sh index 4c66cb58..294af5d7 100755 --- a/misc/tools/rsync-updater/update-to-release.sh +++ b/misc/tools/rsync-updater/update-to-release.sh @@ -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) -- 2.39.2