Created
March 3, 2021 03:30
-
-
Save bistole/30cb68b25eefd3303d2441fc60b7f0fa to your computer and use it in GitHub Desktop.
build dmg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mount dmg | |
echo "Mount DMG..." | |
hdiutil attach ${TEMP_DMG_FILE} | tee ${LOG_FILE0} | |
DMG_UUID=`grep /Volumes/untitled ${LOG_FILE0} | awk '{print $2}'` | |
echo DMG UUID = ${DMG_UUID} | |
# rename dmg | |
echo "Rename DMG's olume name" | |
diskutil rename untitled Storyboard | |
# copy app to dmg | |
echo "Copy files into DMG..." | |
cp -Rf $APP_FILE /Volumes/Storyboard | |
ln -s /Applications /Volumes/Storyboard | |
# detach | |
echo "Unmount DMG..." | |
hdiutil detach /Volumes/Storyboard | |
# convert | |
echo "Convert DMG to readonly..." | |
hdiutil convert -format UDBZ -o ${DMG_FILE} ${TEMP_DMG_FILE} | |
# cleanup | |
rm -f ${TEMP_DMG_FILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment