Commit e65f23b7 authored by Maren Hachmann's avatar Maren Hachmann

Allow to use force option

parent 8c45027f
......@@ -50,11 +50,12 @@ cd $SOURCE_DIR
# don't update everything just yet, to not mess up revision numbers for later comparison
git fetch
# select correct branch
# select correct branch
if [ $# -eq 0 ]
then
BRANCH="master"
elif [ $# -eq 1 ]
elif [ $# -gt 0 ]
then
BRANCH=$1;
if [ ! "`git branch --list -r origin/${BRANCH} `" ]
......@@ -62,6 +63,13 @@ elif [ $# -eq 1 ]
echo "Sorry, the selected branch $BRANCH doesn't exist in the remote repository. Please select a different branch.";
exit 1;
fi
if [ $# -eq 2 ]
then
if [ $2 = '-f' ]
then
FORCE=1
fi
fi
else
echo "Too many arguments. This program takes either the name of a branch, or no argument to default to the master branch.";
exit 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment