Mail Archives: djgpp/2002/07/13/07:17:00
Hello.
deckerben wrote:
>
> "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk> wrote in message
> news:3D2F5A9A DOT 61162235 AT phekda DOT freeserve DOT co DOT uk...
>
> > "When bash is started non-interactively, to run a shell
> > script, for example, it looks for the variable BASH_ENV in
> > the environment, expands its value if it appears there,
> > and uses the expanded value as the name of a file to read
> > and execute. Bash behaves as if the following command
> > were executed:
> > if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
> > but the value of the PATH variable is not used to search
> > for the file name."
>
> I did read that.
>
> So what I understood from that is that I should define %BASH_ENV% like
> %DJGPP% in the DOS environment. That is what what I think I have been trying
> to do. What could be wrong with:
>
> set BASH_ENV=D:\user\DJGPP\etc\profile
>
> ...when D:\user\DJGPP\etc\profile is exactly the same file sas the
> %HOME%\_bashrc, which works for me? Maybe I misunderstood the man page?
Are you using bash interactively? If so, BASH_ENV is not used. BASH_ENV will
only be used, if you're running bash non-interactively - e.g.: if you're
running a script.
Incidentally it looks like my news client / news server truncated my message.
Here's what I wrote in the rest of my message:
config.site has nothing to do with bash. It is used by autoconf, to get the
default value for its tests, e.g.: what command should be used to create
symlinks. config.site comes with bash, because bash used to be updated more
frequently than autoconf (you need bash for autoconf), so it was a good way to
give people the latest config.site. With autoconf 2.50, it comes with
autoconf.
I don't know how to achieve what you want. Can't you just source the file you
want in your _bashrc? E.g.:
source ${DJDIR}/etc/profile
I did some testing and bash didn't seem to source ${DJDIR}/etc/profile
automatically, before sourcing ~/_bashrc. I didn't check that it sources
/etc/profile, though.
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -