deploy.sh 990 Bytes
#!/bin/bash
###############################################################
# deploy - script used to deploy the metarepository,
#delete the old .war and copy the new one
#
###############################################################
TOMCAT=/home/hsilva/Applications/tomcat
JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

cd "$(dirname $0)/../"
echo "----------------------------------"
echo "[script] - rm -rf work/catalina"
echo "----------------------------------"
rm -rf $TOMCAT/work/Catalina/localhost/metarepository*
echo "----------------------------------"
echo "[script] - ant deploy"
echo "----------------------------------"
ant deploy
echo "----------------------------------"
echo "[script] - rm -rf webapps"
echo "----------------------------------"
rm -rf $TOMCAT/webapps/metarepository*
echo "----------------------------------"
echo "[script] - cp new .war"
echo "----------------------------------"
cp deploy/ROOT.war $TOMCAT/webapps/metarepository.war
echo "[script] - Done!"