Index: src/platform/memento_softwareupdate/ping_omaha.sh |
diff --git a/src/platform/memento_softwareupdate/ping_omaha.sh b/src/platform/memento_softwareupdate/ping_omaha.sh |
index bca689f4c9b2fca7ca83c5c2186e901c545366c6..a8e1c2746f30e602c853d950c1f605604eb70112 100755 |
--- a/src/platform/memento_softwareupdate/ping_omaha.sh |
+++ b/src/platform/memento_softwareupdate/ping_omaha.sh |
@@ -5,6 +5,17 @@ |
# found in the LICENSE file. |
source `dirname "$0"`/memento_updater_logging.sh |
+. /usr/lib/shflags || exit 1 |
+ |
+DEFINE_string app_version "" \ |
+ "Force a given app version rather than autodetect" |
+DEFINE_string track "" \ |
+ "Force a given track rather than autodetect" |
+ |
+# Parse command line |
+FLAGS "$@" || exit 1 |
+eval set -- "${FLAGS_ARGV}" |
+ |
OVERRIDE_IS_SECURE="YES" |
# Return the value for a given key in the override lsb-release file if the |
@@ -123,10 +134,7 @@ APP_ID={87efface-864d-49a5-9bb3-4b050a7c227a} |
APP_VERSION=${1:-$LOCAL_VERSION} |
APP_BOARD="$2" |
OS_VERSION=${APP_VERSION}_$(uname -m) |
-PING_APP_VERSION="$APP_VERSION" |
-if [ ! -z "$1" ]; then |
- PING_APP_VERSION="$1" |
-fi |
+PING_APP_VERSION="${FLAGS_app_version:-${APP_VERSION}}" |
LANG=en-us |
BRAND=GGLG |
@@ -158,7 +166,8 @@ USER_ID=$MACHINE_ID |
AU_VERSION=MementoSoftwareUpdate-0.1.0.0 |
-APP_TRACK=$(findLSBValue "CHROMEOS_RELEASE_TRACK") |
+ |
+APP_TRACK=${FLAGS_track:-$(findLSBValue "CHROMEOS_RELEASE_TRACK")} |
APP_BOARD=$(findLSBValue "CHROMEOS_RELEASE_BOARD") |