From bf34e83072ebf8162b6554ef3a1f979555ed8b39 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 8 Dec 2020 16:45:07 +1000 Subject: [PATCH] Add yes/no dialogs to the update scripts, fixes #148 --- misc/tools/rsync-updater/update-to-autobuild.bat | 3 +++ misc/tools/rsync-updater/update-to-autobuild.sh | 3 +++ misc/tools/rsync-updater/update-to-release.bat | 3 +++ misc/tools/rsync-updater/update-to-release.sh | 3 +++ 4 files changed, 12 insertions(+) mode change 100644 => 100755 misc/tools/rsync-updater/update-to-autobuild.bat mode change 100644 => 100755 misc/tools/rsync-updater/update-to-release.bat diff --git a/misc/tools/rsync-updater/update-to-autobuild.bat b/misc/tools/rsync-updater/update-to-autobuild.bat old mode 100644 new mode 100755 index 911628c8..498e2afd --- a/misc/tools/rsync-updater/update-to-autobuild.bat +++ b/misc/tools/rsync-updater/update-to-autobuild.bat @@ -10,6 +10,9 @@ exit :copied +set /p choice=This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? +if /i not "%choice%" == "Y" goto end + set buildtype=release if "%~n0" == "update-to-autobuild" set buildtype=autobuild diff --git a/misc/tools/rsync-updater/update-to-autobuild.sh b/misc/tools/rsync-updater/update-to-autobuild.sh index b0d429dd..4c66cb58 100755 --- a/misc/tools/rsync-updater/update-to-autobuild.sh +++ b/misc/tools/rsync-updater/update-to-autobuild.sh @@ -9,6 +9,9 @@ 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 + case "${0##*/}" in update-to-autobuild.sh) buildtype=autobuild diff --git a/misc/tools/rsync-updater/update-to-release.bat b/misc/tools/rsync-updater/update-to-release.bat old mode 100644 new mode 100755 index 911628c8..498e2afd --- a/misc/tools/rsync-updater/update-to-release.bat +++ b/misc/tools/rsync-updater/update-to-release.bat @@ -10,6 +10,9 @@ exit :copied +set /p choice=This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? +if /i not "%choice%" == "Y" goto end + set buildtype=release if "%~n0" == "update-to-autobuild" set buildtype=autobuild diff --git a/misc/tools/rsync-updater/update-to-release.sh b/misc/tools/rsync-updater/update-to-release.sh index b0d429dd..4c66cb58 100755 --- a/misc/tools/rsync-updater/update-to-release.sh +++ b/misc/tools/rsync-updater/update-to-release.sh @@ -9,6 +9,9 @@ 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 + case "${0##*/}" in update-to-autobuild.sh) buildtype=autobuild -- 2.39.2