always set internet-enabled on the dmg
authorkoda
Wed, 10 Jul 2013 23:50:31 +0200
changeset 9350 59408b4515dd
parent 9349 8ec5cf11e85a
child 9351 09115096c7d6
child 9352 cb893603f068
always set internet-enabled on the dmg
tools/create-dmg.sh
--- a/tools/create-dmg.sh	Wed Jul 10 23:12:32 2013 +0200
+++ b/tools/create-dmg.sh	Wed Jul 10 23:50:31 2013 +0200
@@ -40,6 +40,8 @@
   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 @@
     --eula)
       EULA_RSRC=$2
       shift; shift;;
+    --no-internet-enable)
+      NOINERNET=1
+      shift;;
     -*)
       echo "Unknown option $1. Run with --help for help."
       exit 1;;
@@ -206,5 +211,11 @@
         "${AUX_PATH}/dmg-license.py" "${DMG_DIR}/${DMG_NAME}" "${EULA_RSRC}"
 fi
 
+if [ ! -z "${NOINERNET}" -a "${NOINERNET}" == 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