set -e
# parameter: $1: git tag to build
+# options: -g <alternative repository>
+
+repos="https://github.com/wagner-tech"
+if getopts "g:" opt; then
+ repos=$OPTARG
+ shift 2
+fi
if [ -d kivitendo-erp ]
then
pushd kivitendo-erp >/dev/null
- git fetch
+ branch=$(git rev-parse --abbrev-ref HEAD)
+ git pull origin $branch
else
- git clone https://github.com/wagner-tech/kivitendo-erp
+ git clone $repos/kivitendo-erp
pushd kivitendo-erp >/dev/null
fi
git checkout $1
set -e
# checkout build utilities
-if [ ! -d projects ]; then
+if [ -d projects ]; then
+ pushd projects >/dev/null
+ git pull origin master
+ popd >/dev/null
+else
git clone https://github.com/wagner-tech/projects/
fi
ln -sf projects/tools/make/configure .
echo "Next step: call 'configure <project> <tag>'"
+echo "Available are:"
+ls *.co