diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-10-08 01:10:55 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-10-08 01:14:54 +0200 |
commit | eee4191b685cca0d8ca734d33a1669c2e163b23a (patch) | |
tree | 831712b381b238cff2001e2858b02255407e1112 | |
parent | bb04af993a548f47a110fe23e9e14eb7e8fd34b3 (diff) | |
download | clientdata-eee4191b685cca0d8ca734d33a1669c2e163b23a.tar.gz clientdata-eee4191b685cca0d8ca734d33a1669c2e163b23a.tar.bz2 clientdata-eee4191b685cca0d8ca734d33a1669c2e163b23a.tar.xz clientdata-eee4191b685cca0d8ca734d33a1669c2e163b23a.zip |
Nuke retry.sh (use wget's own retry functionality)
Not a 1:1 replacement.
-rwxr-xr-x | .tools/downloadlib.sh | 6 | ||||
-rwxr-xr-x | .tools/retry.sh | 15 |
2 files changed, 5 insertions, 16 deletions
diff --git a/.tools/downloadlib.sh b/.tools/downloadlib.sh index c1aff5a4..2e27ba80 100755 --- a/.tools/downloadlib.sh +++ b/.tools/downloadlib.sh @@ -6,7 +6,11 @@ export libname="$1_$2" mkdir libdownload cd libdownload rm "${zipname}" -../client-data/.tools/retry.sh wget -O "${zipname}" "https://git.themanaworld.org/mana/spm/builds/artifacts/$1/download?job=${libname}" + +wget --retry-connrefused --retry-on-host-error --tries=10 --waitretry=5 \ + -O "$zipname" \ + "https://git.themanaworld.org/mana/spm/builds/artifacts/$1/download?job=${libname}" + unzip "${zipname}" cp -r "bin/${libname}" .. cd .. diff --git a/.tools/retry.sh b/.tools/retry.sh deleted file mode 100755 index aaa50e98..00000000 --- a/.tools/retry.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -n=0 - -while true; do - $* - if [ "$?" == 0 ]; then - exit 0 - fi - if [[ $n -ge 10 ]]; then - exit -1 - fi - sleep 5s - n=$((n+1)) -done |