export GIT_* variables

This commit is contained in:
Jakobus Schürz 2020-07-16 13:39:39 +02:00 committed by blafoo
parent 7738712d8c
commit ab12293bf8
3 changed files with 21 additions and 21 deletions

View file

@ -14,13 +14,13 @@ if [[ $- = *i* ]] ; then
# default timeouts definted in myshellconfig_load_default
#[ -z "${MYSHELLCONFIG_ROOT_TMOUT+x}" ] && MYSHELLCONFIG_ROOT_TMOUT=500
#[ -z "${MYSHELLCONFIG_USER_TMOUT+x}" ] && MYSHELLCONFIG_USER_TMOUT=0
[ -z "${USERNAME+x}" ] && USERNAME="$USER"
[ -z "${USEREMAIL+x}" ] && USEREMAIL="$USER@$(domainname -d)"
[ -z "${FULLNAME+x}" ] && FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
[ -z "${GIT_AUTHOR_NAME+x}" ] && GIT_AUTHOR_NAME=$FULLNAME
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && GIT_AUTHOR_EMAIL=$USEREMAIL
[ -z "${GIT_COMMITTER_NAME+x}" ] && GIT_COMMITTER_NAME=$FULLNAME
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && GIT_COMMITTER_EMAIL=$USEREMAIL
[ -z "${USERNAME+x}" ] && export USERNAME="$USER"
[ -z "${USEREMAIL+x}" ] && export USEREMAIL="$USER@$(domainname -d)"
[ -z "${FULLNAME+x}" ] && export FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
[ -z "${GIT_AUTHOR_NAME+x}" ] && export GIT_AUTHOR_NAME=$FULLNAME
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && export GIT_AUTHOR_EMAIL=$USEREMAIL
[ -z "${GIT_COMMITTER_NAME+x}" ] && export GIT_COMMITTER_NAME=$FULLNAME
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && export GIT_COMMITTER_EMAIL=$USEREMAIL
[ -z "${MYSHELLCONFIG_SUBPATH+x}" ] && MYSHELLCONFIG_SUBPATH=".local/myshellconfig"
[ -z "${MYSHELLCONFIG_BASE+x}" ] && MYSHELLCONFIG_BASE="${HOME}/${MYSHELLCONFIG_SUBPATH}"

View file

@ -14,13 +14,13 @@ sudo() {
local SUDO
SUDO=$( if [ -e /bin/sudo ]; then echo /bin/sudo; else echo /usr/bin/sudo; fi )
$SUDO \
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
GIT_COMMITTER_EMAIL="$GIT_COMMITTER_EMAIL" \
GIT_COMMITTER_NAME="$GIT_COMMITTER_NAME" \
TMUX="$TMUX" \
SSHS="$SSHS" \
SSH_TTY="$SSH_TTY" \
export GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
export GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
export GIT_COMMITTER_EMAIL="$GIT_COMMITTER_EMAIL" \
export GIT_COMMITTER_NAME="$GIT_COMMITTER_NAME" \
export TMUX="$TMUX" \
export SSHS="$SSHS" \
export SSH_TTY="$SSH_TTY" \
"$@"
}

View file

@ -12,12 +12,12 @@ fi
export WORK=~/Work
[ -z "${USERNAME+x}" ] && USERNAME="$USER"
[ -z "${USEREMAIL+x}" ] && USEREMAIL="$USER@$(domainname -d)"
[ -z "${FULLNAME+x}" ] && FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
[ -z "${GIT_AUTHOR_NAME+x}" ] && GIT_AUTHOR_NAME=$FULLNAME
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && GIT_AUTHOR_EMAIL=$USEREMAIL
[ -z "${GIT_COMMITTER_NAME+x}" ] && GIT_COMMITTER_NAME=$FULLNAME
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && GIT_COMMITTER_EMAIL=$USEREMAIL
[ -z "${USERNAME+x}" ] && export USERNAME="$USER"
[ -z "${USEREMAIL+x}" ] && export USEREMAIL="$USER@$(domainname -d)"
[ -z "${FULLNAME+x}" ] && export FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
[ -z "${GIT_AUTHOR_NAME+x}" ] && export GIT_AUTHOR_NAME=$FULLNAME
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && export GIT_AUTHOR_EMAIL=$USEREMAIL
[ -z "${GIT_COMMITTER_NAME+x}" ] && export GIT_COMMITTER_NAME=$FULLNAME
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && export GIT_COMMITTER_EMAIL=$USEREMAIL
turnoffbeep