fix wrong logic

This commit is contained in:
Jakobus Schürz 2020-01-17 16:03:54 +01:00
parent 1017005260
commit b6cecd1dc2
2 changed files with 6 additions and 6 deletions

View file

@ -147,10 +147,10 @@ if [[ $- = *i* ]] ; then
MYSHELLCONFIG_GIT_REMOTE_PUSH=${MYSHELLCONFIG_GIT_REMOTE_PUSH_PUBLIC}${MYSHELLCONFIG_GIT_REPO_NAME}
fi
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] || export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
[ -z "${MYSHELLCONFIG_GIT_BRANCH+x}" ] || export MYSHELLCONFIG_GIT_BRANCH=master
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] && export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
[ -z "${MYSHELLCONFIG_GIT_BRANCH+x}" ] && export MYSHELLCONFIG_GIT_BRANCH=master
# If TAG is set, checkout is always headless.
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] || { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS=""; }
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] && { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS=""; }
#GIT_SSH_PATH="/srv/repos"

View file

@ -15,8 +15,8 @@
MYSHELLCONFIG_LOGDIR="./logs"
MYSHELLCONFIG_LOGFILE="${MYSHELLCONFIG_LOGDIR}/git.log"
[ -d "${MYSHELLCONFIG_LOGDIR}" ] || mkdir -p "${MYSHELLCONFIG_LOGDIR}"
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] || export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
[ -z "${MYSHELLCONFIG_GIT_BRANCH+x}" ] || export MYSHELLCONFIG_GIT_BRANCH=master
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] && export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
[ -z "${MYSHELLCONFIG_GIT_BRANCH+x}" ] && export MYSHELLCONFIG_GIT_BRANCH=master
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
+-----BEGINN $(date) -------------------------------+
@ -32,7 +32,7 @@ case $1 in
;;
esac
# If TAG is set, checkout is always headless.
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] || { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export PRE=""; }
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] && { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export PRE=""; }
# Output
echo -n " remote: ${MYSHELLCONFIG_GIT_REMOTE_NAME}, branch: ${MYSHELLCONFIG_GIT_BRANCH}: "