Commit c5281a57 authored by Marcus's avatar Marcus

add -f option

parent 973b6ec0
......@@ -11,6 +11,8 @@ CLIENT_BRANCH=master
GOPATH=/tmp/go
INSTALLDIR=/tmp/feudalClientInstaller
FORCE_CLIENT="No"
# Argument Parsing
function usage(){
echo "-ab|--adapter-branch branch of feudalAdapterLdf to use"
......@@ -19,9 +21,10 @@ function usage(){
echo $@
while [ $# -gt 0 ]; do
case "$1" in
-h|--help) usage; exit 0; ;;
-ab|--adapter-branch) ADAPTER_BRANCH=${2} ; shift ;;
-cb|--client-branch) CLIENT_BRANCH=${2} ; shift ;;
-h|--help) usage; exit 0; ;;
-ab|--adapter-branch) ADAPTER_BRANCH=${2} ; shift ;;
-cb|--client-branch) CLIENT_BRANCH=${2} ; shift ;;
-f|--force-client) FORCE_CLIENT="yes" ; shift ;;
*) echo "usage" ;;
esac
shift
......@@ -57,11 +60,18 @@ case "$RV" in
esac
### Install feudalClient
test -e ${INSTALLDIR}/feudalClient/feudalClient || {
# install client if forced
[ x${FORCE_CLIENT} == "xyes" ] && {
rm -f ${INSTALLDIR}/feudalClient/
}
# install client if not installed
test -e ${INSTALLDIR}/feudalClient/ || {
echo "Updating feudalClient"
cd ${INSTALLDIR}
git clone https://git.scc.kit.edu/feudal/feudalClient.git > /dev/null 2>&1
}
test -e ${INSTALLDIR}/feudalClient/feudalClient && {
test -e ${INSTALLDIR}/feudalClient/ && {
echo -e "\nbuilding feudalClient from ${CLIENT_BRANCH}"
cd ${INSTALLDIR}
cd feudalClient
......
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