[FGS] Preliminary packaging

Frank Warmerdam warmerdam at pobox.com
Fri Jun 18 12:36:22 EDT 2004

Tyler Mitchell wrote:
>>Note, there is no point in including the "#!/bin/bash" at the beginning.
>>The setenv.sh script has to be sourced, not run to have an effect on the
>>callers environment.  So if the #! instructions get used it means the
>>script is starting a subshell and won't have any real effect anyway.
> When you say sourced, you mean just as a reference not as a script?  I'm 
> not familiar with the term.
> I removed the first line.


In a bash/sh script you would use the "." operator to essentially include
another script inline.  In csh/tcsh you would use the source command.

So, a persons .bash_profile might include the line:

. /home/fgs/setup.sh

This would run each of the lines in setup.sh, thus setting the environmet
variables in the current context.  If run directly (ie. in a subshell)
it will have no effect on the environment of the parent shell.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Foss-gis-suite mailing list