#!/bin/bash

USED_BRANCH="$1"

function usage(){
	echo "Phoenix Update provides an automatic udpate script to udpate project in the same prefix than PhoenixCMake"
	echo "Usage :"
	echo -e "\tupdate_phoenixzmq somebranch"
	echo -e "\tupdate_phoenixzmq somecommithash"
	echo -e "\tupdate_phoenixzmq sometag"
}

if [[ "${USED_BRANCH}" == "-h"* ]]
then
	usage
	exit 0
fi

if [[ "${USED_BRANCH}" == "--help"* ]]
then
	usage
	exit 0
fi

echo "Let's uninstall the project :"
uninstall_phoenixzmq

echo "And reinstall it :"
phoenix_install  $1

