X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Finfrastructure%2Frefresh-tos.sh;h=8e3d767700ede08ddc92e4823df4ceb899a4b344;hb=98a770f3a5ecb35990d3df04100d881e0f0ac7a1;hp=32ec10c22e8653f1ca21cf47a527676d739bf2c9;hpb=d6856fccad9abe7b0f7223343d0c37dd56d3d9e6;p=xonotic%2Fxonotic.git diff --git a/misc/infrastructure/refresh-tos.sh b/misc/infrastructure/refresh-tos.sh index 32ec10c2..8e3d7677 100755 --- a/misc/infrastructure/refresh-tos.sh +++ b/misc/infrastructure/refresh-tos.sh @@ -8,5 +8,12 @@ set -e export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" cd /var/www/update.xonotic.org/HTML -rm -f tos.txt -wget -qO tos.txt "https://gitlab.com/xonotic/xonotic/-/raw/master/misc/infrastructure/tos.txt" +wget -qO tos.txt.new "https://gitlab.com/xonotic/xonotic/-/raw/master/misc/infrastructure/tos.txt" + +if [ `wc -l tos.txt.new | awk '{print $1}'` -ge "2" ]; then + echo "tos.txt update succeeded." + mv tos.txt.new tos.txt +else + echo "tos.txt updating failed. Please debug." +fi +