From 4e4abd20881eedb5335b043b790a01d0e3ebe1c5 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 28 Sep 2019 10:25:13 +0200 Subject: [PATCH] Set GIT_AUTHOR_* (only) if not set --- .zshenv | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index e5420a3..651fa8e 100644 --- a/.zshenv +++ b/.zshenv @@ -299,7 +299,24 @@ esac case "$FQDN" in *.wsr.ac.at) - export GIT_AUTHOR_EMAIL="$LOGNAME@wsr.ac.at" + if [ -z "$GIT_AUTHOR_EMAIL" ] + then + export GIT_AUTHOR_EMAIL="$LOGNAME@wsr.ac.at" + fi + if [ -z "$GIT_AUTHOR_NAME" ] + then + export GIT_AUTHOR_NAME="Peter J. Holzer" + fi + ;; + *.hjp.at) + if [ -z "$GIT_AUTHOR_EMAIL" ] + then + export GIT_AUTHOR_EMAIL="$LOGNAME@hjp.at" + fi + if [ -z "$GIT_AUTHOR_NAME" ] + then + export GIT_AUTHOR_NAME="Peter J. Holzer" + fi ;; esac