Permalink
Browse files

Merge pull request #21 from kodabb/master

Allow to disable internet-enabling
  • Loading branch information...
2 parents 755381f + 9cbaf88 commit 1b924e51cb3835e8a6830046be660e83cff6ce6b @andreyvit committed Jul 23, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 create-dmg
View
@@ -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
@@ -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;;
@@ -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.