aboutsummaryrefslogtreecommitdiff
path: root/tools/build-docker-image
diff options
context:
space:
mode:
authorMartin André <martin.andre@kvhasia.com>2014-12-29 15:17:54 +0900
committerMartin André <martin.andre@kvhasia.com>2015-01-05 10:34:35 +0900
commited493b84e0ba5ef856b7534268fdb8dbeaea6d6b (patch)
tree2e33b481f399a46c9befd32375b18f4faa46a2f6 /tools/build-docker-image
parent1fcf0bee5fbf455c547db6bd4a581680faf303a8 (diff)
downloadkolla-ed493b84e0ba5ef856b7534268fdb8dbeaea6d6b.tar.gz
kolla-ed493b84e0ba5ef856b7534268fdb8dbeaea6d6b.zip
Make build script respond to `-h` option
It is usually considered good practice for a script to respond to both short style `-h` and long style `--help` options to display help message. This commits adds support for short style `-h` option. Change-Id: I8426b5ec136d08b3a476beea3cb983089e08c401
Diffstat (limited to 'tools/build-docker-image')
-rwxr-xr-xtools/build-docker-image6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/build-docker-image b/tools/build-docker-image
index 370463dd2..df58be807 100755
--- a/tools/build-docker-image
+++ b/tools/build-docker-image
@@ -10,7 +10,7 @@ TAG=$(git rev-parse --short HEAD)
usage () {
cat <<EOF
-$0: usage: $0 [options]
+Usage: $0 [options]
Options:
@@ -25,14 +25,14 @@ EOF
[ -f $IMGDIR/.buildconf ] && . $IMGDIR/.buildconf
[ -f $TOPDIR/.buildconf ] && . $TOPDIR/.buildconf
-ARGS=$(getopt -o 'n:t:pN' -l help,namespace:,push,release,tag:,no-cache -- "$@") || { usage >&2; exit 2; }
+ARGS=$(getopt -o hn:t:pN -l help,namespace:,push,release,tag:,no-cache -- "$@") || { usage >&2; exit 2; }
eval set -- "$ARGS"
while :; do
case "$1" in
- (--help) usage
+ (--help|-h) usage
exit 0
;;