This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I need to run two shell scripts in sequece from ANT. The first one sets up some environment variables and the second one uses them to run IDL compiler. Here is the sequence of steps
1) When I login to unix, i will be in csh 2) The fist script should run in ksh and sets up environment variables 3) The second scripts should also run in same ksh and execute IDL compile
I do this from command line and it works. 1) When I login to Unix, I am in csh, so I just change shell by typing sh 2) I run a build.xml (using ant) that runs following.
So, I added an other exec task before the above task to change the shell using this:
But when I run the build.xml, I see that the shell has not changed. My questions are: 1) how do I change unix shells from ANT? I tried invoking a wrapper script that changes the shell and calling it from ANT but it did not work. 2) If there is a way to setup/change environment variables of Unix from ANT, I think my problem is solved.