1

I use a Bash script to deploy a heavily-customised version of JBoss onto RHEL machines. These scripts do things such as update the port binding offset depending on the name of the instance that is being created, etc.

We now have a need to run the same install on Windows.

One option is to run the Bash scripts under Cygwin, but I would like to explore other options before going down that route. The scripts aren't particularly complicated, they do a bit of parameter parsing, a little searching and replacing, and a large amount of copying.

I can think of Ant as a way of producing a single, reliable, cross-platform deployment script. Are there other options?

Rich
  • 1,343
  • 7
  • 28
  • 39

2 Answers2

1

Python, PHP, Ruby, Perl, etc. all run under both Windows and Linux.

jftuga
  • 5,731
  • 4
  • 42
  • 51
0

If you use ant, you can supplement it with a scripting language. Groovy's antbuilder class really good for this, thought I think jruby does this now. You can either can ant from groovy or groovy from ant. I do the former. I also ended up using JNA to do native calls like symlink, stat, chown, system because java's file operations can be buggy and lacking. I use a library called jna-posix from the jruby project because it does everything I want to do and handles cross-platform issues.

If you just want to use your bash scripts you might consider msysgit. The msys project has no installer, so the easiest way to install it is using by installing git for windows which comes with a very complete msys/mingw environment.