From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: _bashrc somewhere else? Date: Sat, 13 Jul 2002 11:09:12 +0100 Lines: 55 Message-ID: <3D2FFC48.955E90AC@phekda.freeserve.co.uk> References: <3d2f4d48$0$28398$9b622d9e AT news DOT freenet DOT de> <3D2F5A9A DOT 61162235 AT phekda DOT freeserve DOT co DOT uk> <3d2f936f$0$15191$9b622d9e AT news DOT freenet DOT de> NNTP-Posting-Host: modem-109.arkansas.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news8.svr.pol.co.uk 1026555362 11124 62.137.55.109 (13 Jul 2002 10:16:02 GMT) NNTP-Posting-Date: 13 Jul 2002 10:16:02 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. deckerben wrote: > > "Richard Dawe" 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/ ]