summaryrefslogblamecommitdiff
path: root/tools/ci/scripts/retry.sh
blob: e75b234405bc07d2d2f7af6ffa3cd49069ba6b6d (plain) (tree)
1
2
3
4
5
6
7
8
9
                   







                          
                            




               
#!/usr/bin/env 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