I have the following working script on my local linux box in my home dir named deploy:
cd /home/revo/test3 && \
grails clean && \
grails prod war test39.war && \
echo "scp to remote"
scp ~/test3/test39.war email@example.com:/root/uploads && \
echo "tomcat stop"
ssh firstname.lastname@example.org "/etc/init.d/tomcat stop" && \
ssh email@example.com "rm -rf /usr/local/tomcat/webapps/ROOT/*" && \
ssh firstname.lastname@example.org "cd /usr/local/tomcat/webapps/ROOT ; /usr/java/jdk/bin/jar -xvf /root/uploads/test39.war" && \
ssh email@example.com "/etc/init.d/tomcat start" && \
echo "all done"
I simply type ./deploy in terminal to deploy the whole thing to remote server from my local linux box.
Now I need to port above to my local Win XP box. Assume the script would be located at C:\ and instead of /home/revo/test3, I have C:/test3 folder on Win XP and have the same executable program grails on Win XP. Also on Linux I have ssh-add to connect with the remote server with passsword preauthenticated before the script is run. But on Win XP there is no such setup. Assume the remote server credentials: user name: root password: pswd So when you port above script to Win XP , it should also take care of this. On Win XP I have Putty installed.
So please rewrite above script to run in Win XP given the details above.