X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Frsync-updater%2Fupdate-to-autobuild.sh;fp=misc%2Ftools%2Frsync-updater%2Fupdate-to-autobuild.sh;h=32ce1f2a5e21d857445bd2da18cc80dc3d06f6bd;hp=bd1c6fc9da818661169dd15cc49e7929146a337d;hb=94e1185e89944f0c01c4b116bc9fece4ea74f8a1;hpb=60370732d8806adb2264eb3e3094b805be61bb67 diff --git a/misc/tools/rsync-updater/update-to-autobuild.sh b/misc/tools/rsync-updater/update-to-autobuild.sh index bd1c6fc9..32ce1f2a 100755 --- a/misc/tools/rsync-updater/update-to-autobuild.sh +++ b/misc/tools/rsync-updater/update-to-autobuild.sh @@ -9,12 +9,11 @@ if ! which rsync >/dev/null; then exit 1 fi -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 +[ "$1" = "-y" ] && choice=y +until [ "$choice" = y ] || [ "$choice" = Y ]; do + read -rp "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? " choice + [ "$choice" = n ] || [ "$choice" = N ] && exit 1 +done case "${0##*/}" in update-to-autobuild.sh) @@ -28,7 +27,7 @@ esac options="-Prtzil --executability --delete-after --delete-excluded --stats" if [ -d "Xonotic-low" ]; then - echo NOTE: Xonotic-low is gone, downloading normal Xonotic. + echo NOTE: Xonotic-low is gone, downloading normal Xonotic. url="rsync://beta.xonotic.org/$buildtype-Xonotic/" target="Xonotic-low/" elif [ -d "Xonotic-high" ]; then @@ -39,10 +38,10 @@ elif [ -d "../../../.git" ]; then exec ../../../all update elif [ -d "../../../data" ]; then if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then - echo NOTE: Xonotic-low is gone, downloading normal Xonotic. + echo NOTE: Xonotic-low is gone, downloading normal Xonotic. url="rsync://beta.xonotic.org/$buildtype-Xonotic/" elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then - echo NOTE: Xonotic-low is gone, downloading normal Xonotic. + echo NOTE: Xonotic-low is gone, downloading normal Xonotic. url="rsync://beta.xonotic.org/$buildtype-Xonotic/" options="$options -y" # use fuzzy matching because file names differ elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then