mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
0c4a320504
There's not a lot of benefit for trying more than 3 times, and we risk hitting API rate limits.
19 lines
209 B
Bash
Executable File
19 lines
209 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
set -e
|
|
|
|
max_attempts=4
|
|
attempt=1
|
|
|
|
until "$@"
|
|
do
|
|
if (( attempt == max_attempts ))
|
|
then
|
|
echo "Failed after $max_attempts attempts"
|
|
exit 1
|
|
fi
|
|
|
|
sleep 5
|
|
: $(( attempt++ ))
|
|
done
|