diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-03 12:13:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-03 12:13:48 -0400 |
commit | 8a4c3aacd6b398333dbe9f676bd215826c89a0cc (patch) | |
tree | d65af47a6f66825e93f86f05ed6c70a5f8e6fc93 /commit.d/50vcs-commit | |
parent | 0b4b9c7162d41b45664a689c1a1d3b0e0bc283b5 (diff) |
export on separate line from variable definition
Diffstat (limited to 'commit.d/50vcs-commit')
-rwxr-xr-x | commit.d/50vcs-commit | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit index 5987ad6..7c6173f 100755 --- a/commit.d/50vcs-commit +++ b/commit.d/50vcs-commit @@ -46,24 +46,30 @@ if [ "$VCS" = git ] && [ -d .git ]; then USER_HOME="$(perl -e 'print ((getpwnam(shift()))[7])' "$USER")" if [ -n "$USER_HOME" ] && [ -e "$USER_HOME/.gitconfig" ]; then if [ -z "$GIT_AUTHOR_NAME" ]; then - export GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true + GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true + export GIT_AUTHOR_NAME fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then - export GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true + GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true + export GIT_AUTHOR_EMAIL fi fi if [ -z "$GIT_COMMITTER_EMAIL" ]; then - export GIT_COMMITER_EMAIL="$(git config --global user.email)" || true + GIT_COMMITER_EMAIL="$(git config --global user.email)" || true + export GIT_COMMITER_EMAIL fi if [ -z "$GIT_AUTHOR_NAME" ]; then - export GIT_AUTHOR_NAME="$USER" + GIT_AUTHOR_NAME="$USER" + export GIT_AUTHOR_NAME fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then - export GIT_AUTHOR_EMAIL="$USER@$hostname" + GIT_AUTHOR_EMAIL="$USER@$hostname" + export GIT_AUTHOR_EMAIL fi if [ -z "$GIT_COMMITTER_EMAIL" ]; then - export GIT_COMMITTER_EMAIL=`whoami`"@$hostname" + GIT_COMMITTER_EMAIL=`whoami`"@$hostname" + export GIT_COMMITTER_EMAIL fi fi if [ -n "$logfile" ]; then @@ -73,10 +79,12 @@ if [ "$VCS" = git ] && [ -d .git ]; then fi elif [ "$VCS" = hg ] && [ -d .hg ]; then if [ -n "$USER" ]; then - export LOGNAME="$USER" + LOGNAME="$USER" + export LOGNAME fi if [ -z "$HGUSER" ]; then - export HGUSER="$USER@$hostname" + HGUSER="$USER@$hostname" + export HGUSER fi if [ -n "$logfile" ]; then hg commit $HG_COMMIT_OPTIONS -l "$logfile" @@ -85,7 +93,8 @@ elif [ "$VCS" = hg ] && [ -d .hg ]; then fi elif [ "$VCS" = bzr ] && [ -d .bzr ]; then if [ -z "$EMAIL" ] && [ -n "$USER" ]; then - export EMAIL="$USER <$USER@$hostname>" + EMAIL="$USER <$USER@$hostname>" + export EMAIL fi if [ -n "$logfile" ]; then bzr commit $BZR_COMMIT_OPTIONS -F "$logfile" |