if [ "$1" = "c" ]
then
echo "$0: Checkout '${project}' ..."
- git checkout -- .
+ git checkout -- . || exit 255
elif [ "$1" = "r" ]
then
echo "$0: Resetting '${project}' ..."
- git reset --hard
+ git reset --hard || exit 255
fi
echo "$0: Pulling '${project}' ..."
if [ "$1" = "a" ]
then
- git pull --all
+ git pull --all || exit 255
else
- git pull -S origin master
- git fetch upstream
- git fetch transport
+ git pull -S origin master || exit 255
+ git fetch upstream || exit 255
+ git fetch transport || exit 255
fi
echo "$0: Merging upstream into '${project}' ..."
- git merge -S upstream/master
+ git merge -S upstream/master || exit 255
if [ "$1" != "s" -a "$1" != "a" ]
then