I’ve a file referred to as installer.app. I’m utilizing the script under to create a DMG:
appName=installer
installerFile=installer.app
dmgFile=installer.dmg
hdiutil create -volname "${appName}" -srcfolder "${installerFile}" -ov -format UDZO "${dmgFile}"
I obtain an error message stating:
couldn’t entry Volumes/installer/installer.app: operation not permitted
Nonetheless, if I modify the command to the next, I don’t obtain an error:
hdiutil create -volname "${appName}-volume" -srcfolder "${installerFile}" -ov -format UDZO "${dmgFile}"
My query is, since -volname is only a label, why does it not permit it to be the identical as -srcfolder?
Leave a Comment