diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-20 17:37:15 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-20 17:37:15 +0000 |
commit | b42ab58047c4c73832172bccaedddd59433115cb (patch) | |
tree | 9ddc16f31a9705d3aaef58836cc790d8726f4afd /remoting/host | |
parent | 55f42d22c9258b2a307ead064302986847193270 (diff) | |
download | chromium_src-b42ab58047c4c73832172bccaedddd59433115cb.zip chromium_src-b42ab58047c4c73832172bccaedddd59433115cb.tar.gz chromium_src-b42ab58047c4c73832172bccaedddd59433115cb.tar.bz2 |
[Chromoting] Update host installer build script to verify source files.
This will verify that the me2me_host is an official build and also show
and error message if any source target files are missing.
It also expands the Keystone installer pkg.zip.
Review URL: https://chromiumcodereview.appspot.com/10159005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rwxr-xr-x | remoting/host/installer/mac/build.sh | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/remoting/host/installer/mac/build.sh b/remoting/host/installer/mac/build.sh index b6bd646..7bb4690 100755 --- a/remoting/host/installer/mac/build.sh +++ b/remoting/host/installer/mac/build.sh @@ -11,6 +11,11 @@ # * Chromoting installer package # * Keystone (Google auto-update) +error_exit() { + echo "ERROR - $@" 1>&2; + exit 1; +} + PKG_DIR=build PKGPROJ_CHROMOTING='Chromoting.packproj' PKGPROJ_CRD='ChromeRemoteDesktop.packproj' @@ -30,14 +35,39 @@ rm -rf "$DMG_TEMP" # In case previous build failed. # Copy latest release build. # TODO(garykac): Get from proper location. -TARGET_DIR="../../../../out/Release" +TARGET_DIR="../../../../xcodebuild/Release" HOST_SRC="$TARGET_DIR/remoting_me2me_host" -HOST_DST="PrivilegedHelperTools/org.chromium.chromoting.me2me_host" -cp "$HOST_SRC" "./$HOST_DST" +HOST_DST="./PrivilegedHelperTools/org.chromium.chromoting.me2me_host" +if [[ ! -f "$HOST_SRC" ]]; then + error_exit "Unable to find $HOST_SRC"; +fi +cp "$HOST_SRC" "$HOST_DST" + UNINSTALLER_SRC="$TARGET_DIR/remoting_host_uninstaller.app" -UNINSTALLER_DST="Applications/Chrome Remote Desktop Host Uninstaller.app" +UNINSTALLER_DST="./Applications/Chrome Remote Desktop Host Uninstaller.app" +if [[ ! -d "$UNINSTALLER_SRC" ]]; then + error_exit "Unable to find $UNINSTALLER_SRC"; +fi ditto "$UNINSTALLER_SRC" "$UNINSTALLER_DST" +# Verify that the host is the official build +OFFICIAL_CLIENTID=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1 +UNOFFICIAL_CLIENTID=440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj +grep -qF "$OFFICIAL_CLIENTID" "$HOST_DST" +if [[ "$?" != "0" ]]; then + grep -qF "$UNOFFICIAL_CLIENTID" "$HOST_DST" + if [[ "$?" == "0" ]]; then + error_exit "Attempting to build with unoffical build"; + else + error_exit "Unable to determine build type"; + fi +fi + +# Unzip Keystone. +cd Keystone +unzip -qq -o GoogleSoftwareUpdate.pkg.zip +cd .. + # Build the .pkg. echo "Building .pkg..." freeze "$PKGPROJ_CHROMOTING" |