Add extra -u option in snf-image-update-helper
authorNikos Skalkotos <skalkoto@grnet.gr>
Mon, 2 Sep 2013 12:11:11 +0000 (15:11 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Mon, 2 Sep 2013 12:11:11 +0000 (15:11 +0300)
This can be used to overwrite the default HELPER_URL

snf-image-host/snf-image-update-helper.in

index ca7fdb5..7152fad 100644 (file)
@@ -35,6 +35,9 @@ install it under $IMAGE_DIR.
 OPTIONS:
     -h Print this message
 
+    -u URL
+       Download URL to use for the helper image instead of $HELPER_URL
+
     -y Assume Yes to all queries and do not prompt
 
 EOF
@@ -42,10 +45,12 @@ EOF
     exit "$rc"
 }
 
-while getopts "hy" opt; do
+while getopts "hu:y" opt; do
     case $opt in
         h) usage 0
             ;;
+        u) HELPER_URL="$OPTARG"
+            ;;
         y) NO_PROMPT="yes"
             ;;
         ?) log_error "User \`-h' for help"; exit 1