mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
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
|