Last active
December 12, 2015 04:48
-
-
Save lukespragg/4716516 to your computer and use it in GitHub Desktop.
Spoutcraft .dmg generation
This file contains 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
# Make .dmg for Mac | |
DMG_NAME=Spoutcraft | |
VOLUME_LABEL=Spoutcraft | |
du_output=`du -sk $WORKSPACE/$ARTIFACT_ID-$VERSION.app 2>&1` | |
DIR_SIZE=`echo $du_output | cut -f1 -d" "` | |
DIR_SIZE=`expr $DIR_SIZE + 100` | |
dd if=/dev/zero of=$DMG_NAME bs=1024 count=$DIR_SIZE | |
mkfs.hfsplus -v "$VOLUME_LABEL" $DMG_NAME | |
mount -o loop -t hfsplus ./$DMG_NAME /mnt/tmp/ | |
cp -r $DIR_PATH/* /mnt/tmp | |
umount /mnt/tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment