• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Running a shell script from ANT

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Any help is greatly appreciated.

Thanks,
Ram Charan
 
Saloon Keeper
Posts: 26259
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably the easiest solution is to write another shell script that does all of the above and invoke it from Ant.
 
catch it before it slithers away! Oh wait, it's a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic