Add update script.

Add script for silently executing the installer .mpkg when keystone
downloads a new version of the components, and update DMG build
script to copy the update script into the DMG.

Change-Id: I6aef580254bafff4e5a832b77834d48eda90f154
diff --git a/installer/scripts/build/build_dmg.sh b/installer/scripts/build/build_dmg.sh
index dcb3a45..b1f9291 100755
--- a/installer/scripts/build/build_dmg.sh
+++ b/installer/scripts/build/build_dmg.sh
@@ -59,6 +59,9 @@
 
   copy_uninstaller
 
+  # Copy the update install script.
+  cp -p "scripts/keystone_install.sh" "${TEMP_DIR}/.keystone_install"
+
   if [[ -n "${COPY_XIPH_LICENSES}" ]]; then
     # Copy the XiphQT COPYING.*.txt files.
     copy_xiphqt_licenses
@@ -129,27 +132,7 @@
 readonly WEBM_DMG_FILE="webm_quicktime_installer_${WEBM_VERSION}.dmg"
 readonly WEBM_NAME="WebM QuickTime Installer"
 readonly WEBM_MPKG="${WEBM_NAME}.mpkg"
-readonly WEBM_UPDATE_DMG_FILE="webm_quicktime_updater_${WEBM_VERSION}.dmg"
-readonly WEBM_UPDATE_NAME="WebM QuickTime Updater"
-readonly WEBM_UPDATE_PKG="${WEBM_UPDATE_NAME}.pkg"
-readonly XIPHQT_DMG_FILE="xiphqt_updater_${XIPHQT_VERSION}.dmg"
-readonly XIPHQT_NAME="XiphQT Updater"
-readonly XIPHQT_PKG="${XIPHQT_NAME}.pkg"
 
-# Build the DMG files.
-if [[ -z "$1" ]] || [[ "$1" == "all" ]]; then
-  debuglog "Building all disk images."
-  build_dmg "${WEBM_DMG_FILE}" "${WEBM_NAME}" "${WEBM_MPKG}" xiph
-  build_dmg "${XIPHQT_DMG_FILE}" "${XIPHQT_NAME}" "${XIPHQT_PKG}" xiph
-  build_dmg "${WEBM_UPDATE_DMG_FILE}" "${WEBM_UPDATE_NAME}" \
-      "${WEBM_UPDATE_PKG}"
-elif [[ "$1" =~ webm ]]; then
-  debuglog "Building WebM update disk image."
-  build_dmg "${WEBM_UPDATE_DMG_FILE}" "${WEBM_UPDATE_NAME}" \
-      "${WEBM_UPDATE_PKG}"
-elif [[ "$1" =~ xiph ]]; then
-  debuglog "Building XiphQT update disk image."
-  build_dmg "${XIPHQT_DMG_FILE}" "${XIPHQT_NAME}" "${XIPHQT_PKG}" xiph
-fi
-
+# Build the DMG file.
+build_dmg "${WEBM_DMG_FILE}" "${WEBM_NAME}" "${WEBM_MPKG}" xiph
 debuglog "Done."
diff --git a/installer/scripts/keystone_install.sh b/installer/scripts/keystone_install.sh
new file mode 100755
index 0000000..fe9d89d
--- /dev/null
+++ b/installer/scripts/keystone_install.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+##
+##  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+##
+##  Use of this source code is governed by a BSD-style license
+##  that can be found in the LICENSE file in the root of the source
+##  tree. An additional intellectual property rights grant can be found
+##  in the file PATENTS.  All contributing project authors may
+##  be found in the AUTHORS file in the root of the source tree.
+/usr/sbin/installer -pkg "$1/WebM QuickTime Installer.mpkg" -target /