mp3chop-fixes
[cmccabe-bin] / git-identity.sh
index 5c4c0f1..9094a43 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 #
 # Configure git identities on a repo-by-repo basis
@@ -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