mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 09:00:07 +02:00
* Make the `repeat_hdiutil.sh` script more clear about retry counts. * Change usage of `$@` to `"$@"` to pass args correctly * Fix `CPACK_COMMAND_HDIUTIL` generation * Switch `package.sh` to use `$GITHUB_WORKSPACE` * Make `repeat_hdiutil.sh` executable * Remove `set +x` and `set -x` options Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
23 lines
498 B
Bash
23 lines
498 B
Bash
#!/usr/bin/env bash
|
|
|
|
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
|
|
|
set -uo pipefail
|
|
|
|
max_retry=5
|
|
counter=0
|
|
num_secs_await_retry=1
|
|
|
|
echo "Trying: " /usr/bin/hdiutil "$@"
|
|
|
|
until /usr/bin/hdiutil "$@"; do
|
|
sleep $num_secs_await_retry
|
|
if [[ $counter -eq $max_retry ]]; then
|
|
echo "CPack failed despite retry attempts!"
|
|
exit 1
|
|
else
|
|
echo "Trying CPack hdiutil call again. Retry attempt #$counter"
|
|
((counter++))
|
|
fi
|
|
done
|