[GRASS-dev] Re: missing grass configuration files

William Kyngesburye woklist at kyngchaos.com
Tue Dec 8 20:15:50 EST 2009


On Dec 8, 2009, at 1:58 PM, Glynn Clements wrote:

> 
> Michael Barton wrote:
> 
>> I found the file. It is now called "rc" but it is not ending up in  
>> ~/.grass7. Instead, it is just going into HOME.
>> 
>> So this is a bug somewhere, but I'm not sure where. In Init.sh?
> 
> lib/init/*.
> 
> lib/init/Makefile replaces @GRASS_CONFIG_DIR@ with $(GRASS_CONFIG_DIR)
> in init.sh, grass.py and init.bat. However:
> 
> 1. init.sh uses $GRASS_CONFIG_DIR, but doesn't define it; it needs a
> line like:
> 
> 	GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@
> 
> GISRC is defined as:
> 
> 	GISRCRC="$HOME/$GRASS_CONFIG_DIR/rc"
> 
> so the missing definition for GRASS_CONFIG_DIR causes it to be set to
> "$HOME//rc".
> 
Or better

if [ ! "$GRASS_CONFIG_DIR" ] ; then
	GRASS_CONFIG_DIR=@GRASS_CONFIG_DIR@
	export $GRASS_CONFIG_DIR
fi

so it can be overridden by the grass startup to define a build-specific location.

...which I just added in r39949.

Michael - I also updated the scripts that were using the old user addon paths, and made the startup override GRASS_CONFIG_DIR so that it's in the user's Preferences folder on OSX instead of the hidden folder (also more secure).

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war



More information about the grass-dev mailing list