From d5b3d9dacc12d60f0fa2d513165c35f3082c9e08 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 6 Dec 2010 12:51:18 -0800 Subject: [PATCH] Allow specifying an alternate config file URL on the commandline. Change-Id: I1b73674c769027cb557b37d3533534f261521106 BUG=chromium-os:781 TEST=manual Try running recovery.sh with no args. It should try to download the config file from a default location (which may not actually exist). Then try running recovery.sh with a URL as a command-line argument. It should fetch the config file from that location instead. Review URL: http://codereview.chromium.org/5529006 --- user_tools/linux/recovery.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/user_tools/linux/recovery.sh b/user_tools/linux/recovery.sh index 1ce69890ff..b63e91b8f9 100755 --- a/user_tools/linux/recovery.sh +++ b/user_tools/linux/recovery.sh @@ -19,8 +19,9 @@ set -eu # run again without needing to download a second time. WORKDIR=/tmp/tmp.crosrec -# Where do we look for the config file? -CONFIGURL='http://www.chromium.org/some/random/place.cfg' +# Where do we look for the config file? Note that we can override this by just +# specifying the config file URL on the command line. +CONFIGURL="${1:-http://www.chromium.org/some/random/place.cfg}" # What version is this script? It must match the 'recovery_tool_version=' value # in the config file that we'll download.