From: Colin Patrick Mccabe Date: Tue, 14 Feb 2012 16:12:14 +0000 (-0800) Subject: git-identity.sh: improve usage X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc6188375e6ed28311fed0b30b7048c1b88f70d8;p=cmccabe-bin git-identity.sh: improve usage Signed-off-by: Colin McCabe --- diff --git a/git-identity.sh b/git-identity.sh index 5c4c0f1..07cf63d 100755 --- a/git-identity.sh +++ b/git-identity.sh @@ -11,7 +11,9 @@ die() { exit 1 } -[ $# -eq 1 ] || die "You must supply one argument: work or priv" +USAGE="You must supply one argument: work or priv" + +[ $# -eq 1 ] || die "${USAGE}" case $1 in work) git config user.email cmccabe@cloudera.com --file || die "${LINENO}" @@ -22,7 +24,7 @@ case $1 in git config user.name "Colin Patrick Mccabe" --file || die "${LINENO}" ;; *) - die "logic error" + die "${USAGE}" ;; esac