File tree Expand file tree Collapse file tree 1 file changed +15
-18
lines changed Expand file tree Collapse file tree 1 file changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -41,29 +41,26 @@ sed -i '' "s/CHANGEME_SW_VERSION/$sw_version/" "BOOM Remake.app/Contents/Info.pl
4141echo -n " APPL????" > " BOOM Remake.app/Contents/PkgInfo"
4242
4343hdiutil_attempts=0
44+ hdiutil_code_busy=16
4445hdiutil_max_attempts=10
4546
4647while true ; do
47- hdiutil create -fs HFS+ -srcfolder " BOOM Remake.app" -volname " BOOM Remake $sw_version " " BOOM-Remake-$sw_version -mac.dmg"
48- exit_code=$?
49- (( hdiutil_attempts++ ))
48+ if hdiutil create -fs HFS+ -srcfolder " BOOM Remake.app" -volname " BOOM Remake $sw_version " " BOOM-Remake-$sw_version -mac.dmg" ; then
49+ break
50+ else
51+ exit_code=$?
52+ hdiutil_attempts=$(( hdiutil_attempts+ 1 ))
53+ fi
5054
51- case " $exit_code " in
52- 0)
53- break
54- ;;
55- 16)
56- if [ " $hdiutil_attempts " -eq " $hdiutil_max_attempts " ]; then
57- exit 16
58- else
59- sleep $(( 1 * (2 ** hdiutil_attempts)) )
60- fi
55+ if [ " $exit_code " -ne " $hdiutil_code_busy " ]; then
56+ exit " $exit_code "
57+ fi
6158
62- ;;
63- * )
64- exit " $exit_code "
65- ;;
66- esac
59+ if [ " $hdiutil_attempts " -eq " $hdiutil_max_attempts " ] ; then
60+ exit " $hdiutil_code_busy "
61+ else
62+ sleep $(( 1 * ( 2 ** hdiutil_attempts )) )
63+ fi
6764done
6865
6966rm -r " BOOM Remake.app"
You can’t perform that action at this time.
0 commit comments