File: retry.sh

package info (click to toggle)
python-dateutil 2.9.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,316 kB
  • sloc: python: 12,720; makefile: 151; sh: 60
file content (10 lines) | stat: -rwxr-xr-x 133 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash
sleep_time=60
n_retries=5

for i in `seq 1 $n_retries`; do
    "$@" && exit 0
    sleep $sleep_time
done

exit 1