4 echo ERROR: An error was encountered with the build.
9 bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
11 "$@" &> /tmp/build.log
18 echo "Attempting with retry:" "$@"
23 if [[ $n -lt $max ]]; then
24 sleep $n # don't retry immediately
26 echo "Command failed. Attempt $n/$max:"
28 echo "The command has failed after $n attempts."