convert linux script to run on windows xp

I have the following working script on my local linux box in my home dir named deploy:

#/bin/bash
cd /home/revo/test3 && \
grails clean && \
grails prod war test39.war && \
echo "scp to remote"
scp ~/test3/test39.war root@44.249.185.169:/root/uploads && \
echo "tomcat stop"
ssh root@44.249.185.169 "/etc/init.d/tomcat stop" && \
ssh root@44.249.185.169 "rm -rf /usr/local/tomcat/webapps/ROOT/*" && \
ssh root@44.249.185.169 "cd /usr/local/tomcat/webapps/ROOT ; /usr/java/jdk/bin/jar -xvf /root/uploads/test39.war"  && \
ssh root@44.249.185.169 "/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.
zenguruAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dcesariCommented:
If you install cygwin (http://www.cygwin.com/) you can probably use it unmodified, apart from converting pathnames such as /home/revo/test3, and putty will not be needed as well.

Don't know exacly for the passwordless ssh, but I'm sure also on Cygwin you can put your own private/public key in .ssh (or generate them with ssh-keygen) and then use that public key for authentication on the remote ssh server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zenguruAuthor Commented:
I am looking for a solution without cygwin probably converting above script to some sort of windows .bat file. Yes on linux I had setup public and private keys using ssh-keygen.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.