From: Wolfram Schneider Date: Tue, 1 Nov 2011 09:21:54 +0000 (+0000) Subject: improve usage() X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=de31739c7836b1df917de3bcc6cf4190ad262d9a;p=git-tools-moved-to-github.git improve usage() --- diff --git a/id-release b/id-release index 244633a..429c233 100755 --- a/id-release +++ b/id-release @@ -10,7 +10,8 @@ set -e usage () { - echo "usage $0 version" + echo >&2 "usage $0 version" + echo >&2 "$@" exit 1 } @@ -33,8 +34,7 @@ else fi if [ `ls |egrep '\.spec$' | wc -l` -eq 0 ]; then - echo "No *.spec file found" - usage + usage "No *.spec file found" else spec=`ls |egrep '\.spec$' | head -1` package=`perl -ne 's/\s*$//; print if s/^NAME=//' IDMETA`