sh for auto deploying app to tomcat

# deploy script for adwiser report
today=`date +”%m%d”`

sh $adwiser_report/
echo ‘server is being shutdown…’
cd webapps
mv ROOT old$today
unzip $uploader_home/adwiser-report-$today.war -d ./ROOT >> /dev/null
echo ‘unzip code to ROOT dir done.’
cp old$today/WEB-INF/classes/*.properties ROOT/WEB-INF/classes/
cp old$today/WEB-INF/classes/*.yaml ROOT/WEB-INF/classes/
echo ‘copy resource files to ROOT dir done.’
zip old$ -r old$today  >> /dev/null
echo ‘backup old app done.’
rm -rf old$today
cd ..
rm -rf work/*
echo ‘delete temp compiled files done.’
echo ‘PLEASE edit necessary files and restart server manually.’