Last active
August 18, 2017 10:50
-
-
Save julesjans/326012d8a7187f5f0d88e2ea20718343 to your computer and use it in GitHub Desktop.
Compress a file/directory using hdiutil and tar
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
#!/bin/bash | |
hdiutil create -fs HFS+ -srcfolder "$1" -volname "$(basename $1)" "$1.dmg" | |
tar -cjf "$1.tar.bz2" -C "$(dirname $1)" "$(basename $1)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment