1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00
wezterm/ci/retry.sh

19 lines
209 B
Bash
Raw Normal View History

#!/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