#!/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" 

DEVELOP=/usa/novikova/cisc474/MyProjects/scheduleV2
DEPLOY=/usa/novikova/tomcat/webapps/Schedule-v2

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

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

CATALINA_HOME=/porsche/cisc474/tomcat

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

CP=/bin/cp

JAVAC=javac

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

$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$WEBSRC/ScheduleSelect.java
$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$MODELSRC/ScheduleExpert.java
$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$WEBSRC/SelectTime.java
$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$WEBSRC/FreeTimeSelect.java
$JAVAC -classpath $CLASSPATH  -d $DEVELOP/classes $DEVELOP/$WEBSRC/FreeTimeResult.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"
