Skip to content
Snippets Groups Projects
Commit 68e2ed87 authored by Iustin Pop's avatar Iustin Pop
Browse files

Improve devel/upload command line handling


To people not used to it, it was completely non-obvious why
"./devel/upload" didn't do anything.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent b183c4a8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
set -e set -e
usage() {
echo "Usage: $0 [--no-restart] [--no-cron] [--no-debug] hosts..." >&2
exit $1
}
PREFIX='@PREFIX@' PREFIX='@PREFIX@'
SYSCONFDIR='@SYSCONFDIR@' SYSCONFDIR='@SYSCONFDIR@'
PKGLIBDIR='@PKGLIBDIR@' PKGLIBDIR='@PKGLIBDIR@'
...@@ -48,12 +53,11 @@ while [ "$#" -gt 0 ]; do ...@@ -48,12 +53,11 @@ while [ "$#" -gt 0 ]; do
NO_DEBUG=1 NO_DEBUG=1
;; ;;
-h|--help) -h|--help)
echo "Usage: $0 [--no-restart] hosts..." usage 0
exit 0
;; ;;
-*) -*)
echo "Unknown option: $opt" >&2 echo "Unknown option: $opt" >&2
exit 1 usage 1
;; ;;
*) *)
hosts="$hosts $opt" hosts="$hosts $opt"
...@@ -62,6 +66,10 @@ while [ "$#" -gt 0 ]; do ...@@ -62,6 +66,10 @@ while [ "$#" -gt 0 ]; do
shift shift
done done
if [ -z "$hosts" ]; then
usage 1
fi
set ${hosts} set ${hosts}
make regen-vcs-version make regen-vcs-version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment