diff --git a/.gitignore b/.gitignore index d3e0a206e2..d16bb692c4 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ code/*/build code/*/dist geckodriver.log hotfixes +lib/ pidfile *.egg-info* *.geany* diff --git a/code/update.sh b/code/update.sh index 61efdd2a57..80d158ad58 100755 --- a/code/update.sh +++ b/code/update.sh @@ -4,20 +4,27 @@ CURDIR="${BASH_SOURCE[0]}";RL="readlink";([[ `uname -s`=='Darwin' ]] || RL="$RL while([ -h "${CURDIR}" ]) do CURDIR=`$RL "${CURDIR}"`; done N="/dev/null";pushd .>$N;cd `dirname ${CURDIR}`>$N;CURDIR=`pwd`;popd>$N +# Our default branch +Zato_Default_Branch=support/3.2 + +# Always switch to a branch support first +git checkout "${Zato_Default_Branch}" 2>/dev/null || git checkout -b "${Zato_Default_Branch}" "origin/${Zato_Default_Branch}" + echo "*** Downloading updates ***" git -C $CURDIR pull +# A optional, specific branch or commit provded on input while getopts "c:" opt; do case "$opt" in c) - ZATO_BRANCH=$OPTARG + Zato_Branch=$OPTARG ;; esac done -if [[ -n "${ZATO_BRANCH}" ]];then - # Checkout a local branch/commit or create the branch from the remote one - git checkout "${ZATO_BRANCH}" 2>/dev/null || git checkout -b "${ZATO_BRANCH}" "origin/${ZATO_BRANCH}" +if [[ -n "${Zato_Branch}" ]];then + # Check out a local branch/commit or create the branch from the remote one + git checkout "${Zato_Branch}" 2>/dev/null || git checkout -b "${Zato_Branch}" "origin/${Zato_Branch}" fi echo Activating virtualenv in $CURDIR