[GRASS-dev] creating location from the command line
Ivan Shmakov
ivan at theory.asu.ru
Sun Apr 6 02:59:05 EDT 2008
>>>>> Glynn Clements <glynn at gclements.plus.com> writes:
[...]
>> I tinkered with the grass.sh script in
>> /Apps.../Grass-6.3.app/Contents/MacOS to bypass any of the GUI setup
>> (X and Terminal windows) when GRASS_BATCH_JOB is non-empty. That
>> provided the behavior I was after and didn't interfere with
>> interactive use, so setting and acting upon a switch to indicate
>> background execution will work.
> GRASS_BATCH_JOB is a bit of a hack. You would be better off
> bypassing Init.sh altogether.
I wonder, is there a way to create locations non-interactively?
It may be quite useful in, e. g., the test suite's scripts.
I've in mind the following scheme:
* create a fresh location;
* prepare inputs and produce outputs;
* check checksums (SHA1 or MD5) of the files in the locations to
match those contained in the test suite; check for unwanted or
missing files as well;
* if all went good, remove the location; otherwise, leave it in
order for the developer to examine it.
Or, does GRASS use architecture-dependent formats within its
locations?
> FWIW, I just set up the GRASS environment from my ~/.bash_profile,
> with:
> export GISBASE=/opt/grass-6.3.svn
[...]
BTW, it may worth to split the `export's off ~/.bash_profile
into, say, ~/.session_common to `source' from both
~/.bash_profile and ~/.xsession:
[ -f "$HOME"/.session_common ] && . "$HOME"/.session_common
instead of processing ~/.bash_profile itself as part of the X
client-side init sequence. At least, I use some
terminal-related bits in ~/.bash_profile, which weren't meant
for X.
More information about the grass-dev
mailing list