mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
Change-Id: I34e9d64656e04d4f5c477914512219d9b8563b78 BUG=chromium-os:9137 TEST=Ran with both wrong and right versions against a Google Chrome and Chromium build Review URL: http://codereview.chromium.org/4942001
26 lines
669 B
Bash
Executable File
26 lines
669 B
Bash
Executable File
#!/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}"
|