[TriLUG] bash script question

Chris Merrill cmerrill at nc.rr.com
Mon Aug 20 17:25:15 EDT 2001


I have a number of scripts that run various development 
tasks for me (compile, unit test, etc.).  Each of them
need to check/set some environment variables before
doing their work...and they all need to do the same thing
with those variables.  I tried writing a 'slave' script
to do this job, but then realized that invoking the slave
script from within the other scripts would not work,
since it would simply set the environment in a child
process...which would then be lost when the slave script
completes.

What are my options? Can I execute the script in some 
way that doesn't create a child script?

Some background: the point of this exercise is to make
our build scripts execute on a 'clean' machine by any
user without the user having to setup any environment
variables...this script would set the defaults...I 
know I could simply copy the code to set the variables 
into each script, but that would (obviously) be a 
maintenance headache, since we have MANY such scripts
that all require the same variables to be set.

TIA,
Chris
 
*********************************
Chris Merrill
cmerrill at nc.rr.com
*********************************



More information about the TriLUG mailing list