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

Unified Diff: image_to_live.sh

Issue 3417001: Fixed stateful update in image_to_live. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Change stateful URL based on FLAGS. Created 10 years, 3 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: image_to_live.sh
diff --git a/image_to_live.sh b/image_to_live.sh
index a6b70bee90def1614300ace56faa3655a0e96cd6..449eba89e16ee8cb1f2d10444dd3a5bfc99f809f 100755
--- a/image_to_live.sh
+++ b/image_to_live.sh
@@ -69,12 +69,22 @@ function start_dev_server {
# from the dev server and prepares the update. chromeos_startup finishes
# the update on next boot.
function copy_stateful_update {
- info "Starting stateful update."
- local dev_dir="$(dirname $0)/../platform/dev"
+ local dev_url=$(get_devserver_url)
+ local stateful_url=""
+
+ # Assume users providing an update url are using an archive_dir path.
+ if [ -n "${FLAGS_update_url}" ]; then
+ stateful_url=$(echo ${dev_url} | sed -e "s/update/static\/archive/")
+ else
+ stateful_url=$(echo ${dev_url} | sed -e "s/update/static/")
+ fi
+
+ info "Starting stateful update using URL ${stateful_url}"
# Copy over update script and run update.
- remote_cp_to "$dev_dir/stateful_update" "/tmp"
- remote_sh "/tmp/stateful_update"
+ local dev_dir="$(dirname $0)/../platform/dev"
+ remote_cp_to "${dev_dir}/stateful_update" "/tmp"
+ remote_sh "/tmp/stateful_update ${stateful_url}"
}
function get_update_args {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698