#!/bin/sh TC=tomcat6 if [ -z $TC_HOME ]; then TC_HOME=/var/lib/$TC fi if [ -z $TC_CMD ]; then TC_CMD="sudo /sbin/service $TC" fi rpm -q $TC > /dev/null if [ "$?" -ne 0 ]; then TC=tomcat5 rpm -q $TC > /dev/null if [ "$?" -ne 0 ]; then echo "DEPLOYMENT FAILED: you don't have tomcat installed" exit 1 fi fi buildr candlepin:schema_gen sudo service tomcat6 stop dropdb candlepin && createdb candlepin psql candlepin < target/schemagen/candlepin-proxy.sql psql candlepin < code/schema/postgresql/populate-defaults.sql buildr package test=no sudo rm -rf $TC_HOME/webapps/candlepin/ sudo cp target/candlepin-1.0.0.war $TC_HOME/webapps/ $TC_CMD stop $TC_CMD start