Skip to content

Commit

Permalink
Retry hdiutil call in dmg build script
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1t3cht committed Jan 3, 2025
1 parent fdac697 commit 1b2dd29
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/osx-dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ cp -v "${SRC_DIR}/packages/osx_bundle/Contents/Resources/Aegisub.icns" "${DMG_TM

echo
echo "---- Creating image ----"
/usr/bin/hdiutil create -srcfolder "${DMG_TMP_DIR}" -volname "${PKG_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${DMG_RW_PATH}"
max_tries=10
i=0
until /usr/bin/hdiutil create -srcfolder "${DMG_TMP_DIR}" -volname "${PKG_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${DMG_RW_PATH}"; do
if [ $i -eq $max_tries ]; then
echo "Error: hdiutil failed after ${max_tries} tries."
exit 1
fi
i=$((i+1))
done

echo
echo "---- Mounting image ----"
Expand Down

0 comments on commit 1b2dd29

Please sign in to comment.