diff options
Diffstat (limited to 'tools/ci/scripts')
-rwxr-xr-x | tools/ci/scripts/retry.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/ci/scripts/retry.sh b/tools/ci/scripts/retry.sh new file mode 100755 index 000000000..b54c3b074 --- /dev/null +++ b/tools/ci/scripts/retry.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +n=0 + +while true; do + $* + if [ "$?" == 0 ]; then + exit 0 + fi + if [[ $n -ge 5 ]]; then + exit -1 + fi + sleep 5s + n=$((n+1)) +done |