Skip to content

Commit

Permalink
Merge pull request #21 from kodabb/master
Browse files Browse the repository at this point in the history
Allow to disable internet-enabling
  • Loading branch information
andreyvit committed Jul 23, 2013
2 parents 755381f + 9cbaf88 commit 1b924e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions create-dmg
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function usage() {
echo " make a drop link to Applications, at location x,y"
echo " --eula eula_file"
echo " attach a license file to the dmg"
echo " --no-internet-enable"
echo " disable automatic mount&copy"
echo " --version show tool version number"
echo " -h, --help display this help"
exit 0
Expand Down Expand Up @@ -96,6 +98,9 @@ while test "${1:0:1}" = "-"; do
--eula)
EULA_RSRC=$2
shift; shift;;
--no-internet-enable)
NOINTERNET=1
shift;;
-*)
echo "Unknown option $1. Run with --help for help."
exit 1;;
Expand Down Expand Up @@ -206,5 +211,11 @@ if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then
"${AUX_PATH}/dmg-license.py" "${DMG_DIR}/${DMG_NAME}" "${EULA_RSRC}"
fi

if [ ! -z "${NOINTERNET}" -a "${NOINTERNET}" == 1 ]; then
echo "not setting 'internet-enable' on the dmg"
else
hdiutil internet-enable -yes "${DMG_DIR}/${DMG_NAME}"
fi

echo "Disk image done"
exit 0

0 comments on commit 1b924e5

Please sign in to comment.