Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: bin/cros_get_chrome_version

Issue 4942001: Add option to check version of Chrome on target. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Change name Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bin/cros_run_vm_test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_get_chrome_version
diff --git a/bin/cros_get_chrome_version b/bin/cros_get_chrome_version
new file mode 100755
index 0000000000000000000000000000000000000000..a29cb3275f5602ca05f72c0e80e9833c97127d77
--- /dev/null
+++ b/bin/cros_get_chrome_version
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Returns the version of Chrome running on a remote machine.
+
+. "$(dirname $0)/../common.sh"
+. "$(dirname $0)/../remote_access.sh"
+
+FLAGS "$@" || exit 1
+
+set -e
+
+# TMP necessary for remote_access_init.
+TMP=$(mktemp -d /tmp/cros_check_chrome_version.XXXX)
+trap "rm -rf ${TMP}" EXIT
+
+remote_access_init &> /dev/null
+
+remote_sh "/opt/google/chrome/chrome --version"
+CHROME_VERSION=$(echo ${REMOTE_OUT} | \
+ sed 's/.* \([0-9]\+.[0-9]\+.[0-9]\+.[0-9]\+\).*/\1/')
+echo "${CHROME_VERSION}"
« no previous file with comments | « no previous file | bin/cros_run_vm_test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698