#!/bin/sh
# P. Conrad for CISC474, 02.19.2006
#  Example shell script to deploy application based on 
#  chapter 3 of "Head First Servlets and JSP" 

set DEVELOP=/m/imageua/worrall/cisc474/MyProjects/beerV1
set DEPLOY=/m/imageua/worrall/tomcat/webapps/Beer-v1

set MODEL=classes/com/example/model
set WEB=classes/com/example/web

set MODELSRC=src/com/example/model
set WEBSRC=src/com/example/web

set CATALINA_HOME=/porsche/cisc474/tomcat

set CLASSPATH=$CATALINA_HOME/common/lib/servlet-api.jar:$DEVELOP/classes:classes:.

set CP=cp

set JAVAC=javac

#Substitute the following line to see some additional warnings
#JAVAC="javac -Xlint:unchecked" 

$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$WEBSRC/BeerSelect.java
$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$MODELSRC/BeerExpert.java

$CP $DEVELOP/$MODEL/*.class $DEPLOY/WEB-INF/$MODEL
$CP $DEVELOP/$WEB/*.class   $DEPLOY/WEB-INF/$WEB
$CP $DEVELOP/etc/web.xml    $DEPLOY/WEB-INF
$CP $DEVELOP/web/*.html     $DEPLOY
$CP $DEVELOP/web/*.jsp      $DEPLOY
echo "Deployed"