@@ -5,7 +5,7 @@ function startsWithDash {
55 test " ${1: 0: 1} " = " -"
66}
77function paramsAreEmpty {
8- test ${ #@ } -eq 0
8+ test $# -eq 0
99}
1010
1111function printHelp {
5151# ## create/find credentials for using with git
5252
5353if [ -n " $SUDO_USER " ]; then
54- homedir=$( getent passwd ${SUDO_USER} | cut -d\ : -f 6)
54+ homedir=$( getent passwd ${SUDO_USER} | cut -d: -f 6)
5555 git_config_file=" ${homedir} " /.gitconfig
5656 hostname=$( hostname -f)
5757 # check for user credentials!
5858 if [ -z " $GIT_COMMITTER_NAME " ]; then
5959 # if they do not exist, try to read from gitconfig in home dir
60- export GIT_COMMITTER_NAME=$( git config -f $git_config_file user.name)
61- export GIT_AUTHOR_NAME=$( git config -f $git_config_file user.name)
62- export GIT_COMMITTER_EMAIL=$( git config -f $git_config_file user.email)
63- export GIT_AUTHOR_EMAIL=$( git config -f $git_config_file user.email)
60+ export GIT_COMMITTER_NAME=$( git config -f " $git_config_file " user.name)
61+ export GIT_AUTHOR_NAME=$( git config -f " $git_config_file " user.name)
62+ export GIT_COMMITTER_EMAIL=$( git config -f " $git_config_file " user.email)
63+ export GIT_AUTHOR_EMAIL=$( git config -f " $git_config_file " user.email)
6464 # if this fails ... generate the credentials
6565 fi
6666 : ${GIT_COMMITTER_EMAIL:= ${SUDO_USER} @ ${hostname} }
@@ -69,7 +69,7 @@ if [ -n "$SUDO_USER" ]; then
6969 : ${GIT_AUTHOR_NAME:= ${SUDO_USER} }
7070fi
7171# ###############################################################################
72- export GIT_DIR=$SYSGIT_PATH_OFFSET /var/lib/sysgit
72+ export GIT_DIR=" $SYSGIT_PATH_OFFSET /var/lib/sysgit"
7373test -e /var/lib/sysgit/ssh && export GIT_SSH=/var/lib/sysgit/ssh
7474
7575" $@ "
0 commit comments