mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
Add `umount` command behavior Modify to retry 12 times over the course of 240 seconds total Change `scripts\build\macOS\DMGSetup.scpt` to close DMG when finished. Improve system detection for setting project name. Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
27 lines
653 B
Bash
Executable File
27 lines
653 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
|
|
|
set -uo pipefail
|
|
|
|
max_retry=12
|
|
counter=0
|
|
num_secs_await_retry=20
|
|
|
|
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 "Attempting to umount before retry..."
|
|
modified_args=("$@")
|
|
modified_args[0]="umount"
|
|
/usr/bin/hdiutil "${modified_args[@]}"
|
|
echo "Trying hdiutil call again. Retry attempt #$counter"
|
|
((counter++))
|
|
fi
|
|
done
|