- run install.sh
- write contents from profile.sh to ~/.bash_profile
- use like
pkgapp /Applications/Apple\ Configurator\ 2.app
- OR
pkgapp Apple\ Configurator\ 2.app
- OR
pkgapp Apple\ Configurator\ 2
- search dmg on your desktop
Last active
June 25, 2019 05:50
-
-
Save egeneralov/794d24edeaf55abc5005c4963df4d127 to your computer and use it in GitHub Desktop.
pkg your applications
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 -xe | |
wget https://raw.githubusercontent.com/adobe/chromium/master/chrome/installer/mac/pkg-dmg | |
install pkg-dmg /usr/local/bin/pkg-dmg | |
rm pkg-dmg |
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
pkgapp () { | |
cd /Applications/ | |
NAME=$(echo "$1" | sed 's/\///g' | sed 's/.app//g' | sed 's/Applications//g') | |
TMP_DIR="/tmp/TMP_DIR_${NAME}" | |
mkdir -p "${TMP_DIR}" | |
mv "/Applications/${NAME}.app" "${TMP_DIR}" | |
pkg-dmg \ | |
--verbosity 2 \ | |
--volname "${NAME}" \ | |
--source "${TMP_DIR}" \ | |
--target "${HOME}/Desktop/${NAME}.dmg" | |
mv "${TMP_DIR}/${NAME}.app" "/Applications" | |
rm -rf "${TMP_DIR}" | |
cd - | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment