From 9374e89eef8115bf1680585eb32ab11bb1942525 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Tue, 14 Feb 2012 08:10:28 -0800 Subject: [PATCH] Create git-identity.sh Signed-off-by: Colin McCabe --- git-identity.sh | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) create mode 100755 git-identity.sh diff --git a/git-identity.sh b/git-identity.sh new file mode 100755 index 0000000..5c4c0f1 --- /dev/null +++ b/git-identity.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# +# Configure git identities on a repo-by-repo basis +# +# Colin Patrick McCabe +# + +die() { + echo $@ + exit 1 +} + +[ $# -eq 1 ] || die "You must supply one argument: work or priv" +case $1 in + work) + git config user.email cmccabe@cloudera.com --file || die "${LINENO}" + git config user.name "Colin Patrick Mccabe" --file || die "${LINENO}" + ;; + priv) + git config user.email cmccabe@alumni.cmu.edu --file || die "${LINENO}" + git config user.name "Colin Patrick Mccabe" --file || die "${LINENO}" + ;; + *) + die "logic error" + ;; +esac + +exit 0 -- 1.6.6.rc1.39.g9a42