[GRASS-dev] [$HOME on csh] GEM Wizard question
Hamish
hamish_nospam at yahoo.com
Thu May 24 07:43:05 EDT 2007
Glynn Clements wrote:
>
> Hamish wrote:
>
> > William Kyngesburye wrote:
> > > Is that from within GRASS, or other shell use? Which platform?
> > > If GRASS needs HOME as Hamish says, then it won't run without it
> > > (or not run right), so G_home() will always work. Unless maybe
> > > the GRASS libraries are used outside of GRASS, like in Qgis or
> > > GDAL.
> >
Hamish:
> > maybe it has something to do with resetting $HOME so .bash_history
> > is placed in the $MAPSET dir?
> >
> > e.g. I see that csh in lib/init/init.sh does:
> >
> > csh|tcsh)
> > USERHOME="$HOME" # save original home
> > HOME="$LOCATION"
> > export HOME
> > cshrc="$HOME/.cshrc"
> >
> > the bash version has "# restore user home path", but I don't see
> > that in the csh section. (perhaps I'm looking past it)
> >
> > Anyone on Mac who created their user acc't prior to OSX 10.2 will
> > have csh as their default shell (even if you've upgraded the rest of
> > the system).
> >
> > So maybe the broken $HOME happens when the shell is csh?
Glynn:
> If you look 2 lines further down, the code to restore the setting for
> csh is:
>
> echo "set home = $USERHOME" > "$cshrc"
>
> I would have thought that it should be "set HOME = ..."; environment
> variables are case-sensitive on Unix.
$home was used before this change:
http://freegis.org/cgi-bin/viewcvs.cgi/grass/src/general/init/init.sh.diff?r1=1.2&r2=1.3
Hamish
More information about the grass-dev
mailing list