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

Unified Diff: linux/recovery.sh

Issue 6628013: Reduce confusion by requiring "--config URL" args for debugging. (Closed)
Patch Set: Created 9 years, 10 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: linux/recovery.sh
diff --git a/linux/recovery.sh b/linux/recovery.sh
index 56fc255ab8e8707e5e77b0d994b411bffca77616..234c00c2baaed4caf36f5b13407cf780c177a306 100755
--- a/linux/recovery.sh
+++ b/linux/recovery.sh
@@ -19,9 +19,10 @@ set -eu
# run again without needing to download a second time.
WORKDIR=${WORKDIR:-/tmp/tmp.crosrec}
-# 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:-https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf}"
+# Where do we look for the config file? We can override this for debugging by
+# specifying "--config URL" on the command line, but curl and wget may handle
+# file URLs differently.
+CONFIGURL="${2:-https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf}"
# Device to put this stuff on, perhaps the user knows best?
DEVICE="${DEVICE:-}"
@@ -787,6 +788,13 @@ unmount_partition() {
##############################################################################
# Okay, do something...
+# Warn about usage
+if [ -n "${1:-}" ] && [ "$1" != "--config" ]; then
+ echo "This program takes no arguments. Just run it."
+ # That's not really true. For debugging you can specify "--config URL".
+ exit 1
+fi
+
# Make sure we have the tools we need
require_utils
« 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