summaryrefslogtreecommitdiffstats
path: root/remoting/tools
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 23:45:41 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 23:45:41 +0000
commitb85bed0c0d52d60c1b45da69a49c8add558e0e84 (patch)
tree85d683ebba4c6789e124954d17aa1c52994b1213 /remoting/tools
parent722bedab925c1bc8c2a5bf5f816de5575b54b64d (diff)
downloadchromium_src-b85bed0c0d52d60c1b45da69a49c8add558e0e84.zip
chromium_src-b85bed0c0d52d60c1b45da69a49c8add558e0e84.tar.gz
chromium_src-b85bed0c0d52d60c1b45da69a49c8add558e0e84.tar.bz2
[Chromoting] Add script to switch release channels.
Review URL: https://codereview.chromium.org/11154023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rwxr-xr-xremoting/tools/mac/chromoting-set-channel.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/remoting/tools/mac/chromoting-set-channel.sh b/remoting/tools/mac/chromoting-set-channel.sh
new file mode 100755
index 0000000..ab1e37a
--- /dev/null
+++ b/remoting/tools/mac/chromoting-set-channel.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -e -u
+
+ME="$(basename "$0")"
+readonly ME
+
+KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/MacOS/ksadmin
+KSPID=com.google.chrome_remote_desktop
+
+usage() {
+ echo "Usage: ${ME} <channel>" >&2
+ echo "where <channel> is 'beta' or 'stable'" >&2
+}
+
+log() {
+ local message="$1"
+ echo "${message}"
+ logger "${message}"
+}
+
+checkroot() {
+ if [[ "$(id -u)" != "0" ]]; then
+ echo "This script requires root permissions" 1>&2
+ exit 1
+ fi
+}
+
+main() {
+ local channel="$1"
+
+ if [[ "${channel}" != "beta" && "${channel}" != "stable" ]]; then
+ usage
+ exit 1
+ fi
+
+ local channeltag="${channel}"
+ if [[ "${channel}" == "stable" ]]; then
+ channeltag=""
+ fi
+
+ log "Switching Chrome Remote Desktop channel to ${channel}"
+
+ $KSADMIN --productid "$KSPID" --tag "${channeltag}"
+
+ if [[ "${channel}" == "stable" ]]; then
+ echo "You're not done yet!"
+ echo "You must now UNINSTALL and RE-INSTALL the latest version of Chrome"
+ echo "Remote Desktop to get your machine back on the stable channel."
+ echo "Thank you!"
+ else
+ echo "Switch to ${channel} channel complete."
+ echo "You will download ${channel} binaries during the next update check."
+ fi
+}
+
+checkroot
+
+if [[ $# < 1 ]]; then
+ usage
+ exit 1
+fi
+
+main "$@"