summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/retry.sh
blob: b54c3b07447ad4f5c80a0e1059420d95f8fa3e09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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