fix wrong logic
This commit is contained in:
parent
1017005260
commit
b6cecd1dc2
2 changed files with 6 additions and 6 deletions
|
@ -147,10 +147,10 @@ if [[ $- = *i* ]] ; then
|
||||||
MYSHELLCONFIG_GIT_REMOTE_PUSH=${MYSHELLCONFIG_GIT_REMOTE_PUSH_PUBLIC}${MYSHELLCONFIG_GIT_REPO_NAME}
|
MYSHELLCONFIG_GIT_REMOTE_PUSH=${MYSHELLCONFIG_GIT_REMOTE_PUSH_PUBLIC}${MYSHELLCONFIG_GIT_REPO_NAME}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] || export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
|
[ -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_BRANCH+x}" ] && export MYSHELLCONFIG_GIT_BRANCH=master
|
||||||
# If TAG is set, checkout is always headless.
|
# 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"
|
#GIT_SSH_PATH="/srv/repos"
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
MYSHELLCONFIG_LOGDIR="./logs"
|
MYSHELLCONFIG_LOGDIR="./logs"
|
||||||
MYSHELLCONFIG_LOGFILE="${MYSHELLCONFIG_LOGDIR}/git.log"
|
MYSHELLCONFIG_LOGFILE="${MYSHELLCONFIG_LOGDIR}/git.log"
|
||||||
[ -d "${MYSHELLCONFIG_LOGDIR}" ] || mkdir -p "${MYSHELLCONFIG_LOGDIR}"
|
[ -d "${MYSHELLCONFIG_LOGDIR}" ] || mkdir -p "${MYSHELLCONFIG_LOGDIR}"
|
||||||
[ -z "${MYSHELLCONFIG_GIT_REMOTE_NAME+x}" ] || export MYSHELLCONFIG_GIT_REMOTE_NAME=origin
|
[ -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_BRANCH+x}" ] && export MYSHELLCONFIG_GIT_BRANCH=master
|
||||||
|
|
||||||
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
||||||
+-----BEGINN $(date) -------------------------------+
|
+-----BEGINN $(date) -------------------------------+
|
||||||
|
@ -32,7 +32,7 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# If TAG is set, checkout is always headless.
|
# 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
|
# Output
|
||||||
echo -n " remote: ${MYSHELLCONFIG_GIT_REMOTE_NAME}, branch: ${MYSHELLCONFIG_GIT_BRANCH}: "
|
echo -n " remote: ${MYSHELLCONFIG_GIT_REMOTE_NAME}, branch: ${MYSHELLCONFIG_GIT_BRANCH}: "
|
||||||
|
|
Loading…
Reference in a new issue