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

Unified Diff: src/platform/memento_softwareupdate/memento_updater.sh

Issue 503088: add -f option to force a client update (Closed)
Patch Set: Created 11 years 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 | « src/platform/dev/autoupdate.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/memento_softwareupdate/memento_updater.sh
diff --git a/src/platform/memento_softwareupdate/memento_updater.sh b/src/platform/memento_softwareupdate/memento_updater.sh
index 9a8c1d08a1786d969d14911e61101a53218835da..c6dafa23b59a47f0c7712e1a77045bbff112fbcc 100755
--- a/src/platform/memento_softwareupdate/memento_updater.sh
+++ b/src/platform/memento_softwareupdate/memento_updater.sh
@@ -58,6 +58,12 @@ fi
trap 'rm -f "$PID_FILE"; log Memento AutoUpdate terminating; exit $?' \
INT TERM EXIT
+if [ x$1 = "x-f" ]; then
+ log "Forced update requested"
+ ForceUpdate="yes"
+ shift
+fi
+
log Memento AutoUpdate starting
# Get local version
@@ -84,7 +90,11 @@ then
fi
# check w/ omaha to see if there's an update
- OMAHA_CHECK_OUTPUT=$(`dirname "$0"`/ping_omaha.sh $APP_VERSION)
+ if [ "$ForceUpdate" = "yes" ]; then
+ OMAHA_CHECK_OUTPUT=$(`dirname "$0"`/ping_omaha.sh "ForcedUpdate")
+ else
+ OMAHA_CHECK_OUTPUT=$(`dirname "$0"`/ping_omaha.sh $APP_VERSION)
+ fi
IMG_URL=$(echo "$OMAHA_CHECK_OUTPUT" | grep '^URL=' | cut -d = -f 2-)
CHECKSUM=$(echo "$OMAHA_CHECK_OUTPUT" | grep '^HASH=' | cut -d = -f 2-)
else
@@ -224,7 +234,8 @@ then
exit 1
else
# See if it's newer than us
- if version_number_greater_than "$APP_VERSION" "$NEW_VERSION"
+ if [ "$ForceUpdate" != "yes" ] &&
+ version_number_greater_than "$APP_VERSION" "$NEW_VERSION"
then
log "Can't upgrade to older version: " "$NEW_VERSION"
umount "$MOUNTPOINT"
« no previous file with comments | « src/platform/dev/autoupdate.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698