sh for auto deploying app to tomcat

# deploy script for adwiser report
uploader_home=/home/user_name
adwiser_report=/home/adwiser_test/app/report/report_beta
today=`date +”%m%d”`

sh $adwiser_report/shutdown.sh
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$today.zip -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.’