fixed git commit author
This commit is contained in:
parent
0621f62267
commit
f12d31bb82
|
@ -97,6 +97,9 @@ GIT_REPOSITORIES="/etc /etc/bind"
|
||||||
# git statuses
|
# git statuses
|
||||||
GIT_STATUSES=""
|
GIT_STATUSES=""
|
||||||
|
|
||||||
|
# current user of sudo, or root if not defined
|
||||||
|
[ $SUDO_USER ] && CURR_USER=$SUDO_USER || CURR_USER=$USER
|
||||||
|
|
||||||
if test -x "${GIT_BIN}"; then
|
if test -x "${GIT_BIN}"; then
|
||||||
# loop on possible directories managed by GIT
|
# loop on possible directories managed by GIT
|
||||||
for dir in ${GIT_REPOSITORIES}; do
|
for dir in ${GIT_REPOSITORIES}; do
|
||||||
|
@ -164,7 +167,7 @@ if test -x "${GIT_BIN}"; then
|
||||||
CHANGED_LINES=$(${GIT_BIN} status --porcelain | wc -l | tr -d ' ')
|
CHANGED_LINES=$(${GIT_BIN} status --porcelain | wc -l | tr -d ' ')
|
||||||
if [ "${CHANGED_LINES}" != "0" ]; then
|
if [ "${CHANGED_LINES}" != "0" ]; then
|
||||||
${GIT_BIN} add --all
|
${GIT_BIN} add --all
|
||||||
${GIT_BIN} commit --message "${TEXTE}" --author="${USER} <${USER}@evolix.net>" --quiet
|
${GIT_BIN} commit --message "${TEXTE}" --author="${CURR_USER} <${CURR_USER}@evolix.net>" --quiet
|
||||||
# Add the SHA to the log file if something has been committed
|
# Add the SHA to the log file if something has been committed
|
||||||
SHA=$(${GIT_BIN} rev-parse --short HEAD)
|
SHA=$(${GIT_BIN} rev-parse --short HEAD)
|
||||||
STATS=$(${GIT_BIN} show --stat | tail -1)
|
STATS=$(${GIT_BIN} show --stat | tail -1)
|
||||||
|
|
Loading…
Reference in a new issue