From: Mark Wooding Date: Tue, 22 Dec 2015 21:22:23 +0000 (+0000) Subject: lib/lib.sh, bin/make-cert: Fix usage message handling. X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-letsencrypt/commitdiff_plain/93005620045f6d95792ad8eb8e717be47bda82e1?hp=710b5c2b06f89147b75962ae1894b857c6ce11e0 lib/lib.sh, bin/make-cert: Fix usage message handling. Make the separating space be the script's responsibility. Actually include a usage message in `make-cert'. --- diff --git a/bin/make-cert b/bin/make-cert index 8c5605b..97c946f 100755 --- a/bin/make-cert +++ b/bin/make-cert @@ -1,5 +1,6 @@ #! /bin/sh set -e +usage=" TAG" . "${0%/*}/../config.sh" . "$home/lib/lib.sh" diff --git a/lib/lib.sh b/lib/lib.sh index 7c80b68..467f1ca 100644 --- a/lib/lib.sh +++ b/lib/lib.sh @@ -2,7 +2,7 @@ prog=${0##*/} -usage () { echo "usage: $prog $usage"; } +usage () { echo "usage: $prog$usage"; } fail () { echo >&2 "$prog: $*"; exit 1; } fail_usage () { usage >&2; exit 1; }