Opened 17 years ago

Closed 17 years ago

#53 closed task (fixed)

init.sh: cleanup session $tmp on exit and require -c to create mapset from the command line

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Default Version: unspecified
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

Hi,

the attached patch does two things:

  • If you exit GRASS in an abnormal way (even from the startup GUI "Exit" button) it left behind old dirs in /tmp. This fixes that.
  • In 6.3 if you start grass from the command line with the path to the mapset as a parameter it will create a new mapset for you if it doesn't exist (after checking that the location is valid). This patch adds a -c flag to the grass63 startup script for that case, to avoid the silent success of 'grass63 /path/to/typo' bugs.

Users who currently rely on this feature in batch grass scripts can set

export CREATE_NEW=1

before starting their script to mimic the old way.

Posting this patch to the tracker instead of applying it directly in SVN to get input from anyone who uses this style of automatic mapset creation in scripts.

this should not have any bearing on trac bug #7 (which I still hope to spend some time on at some point).

Hamish

Attachments (1)

init.sh_create_and_cleanup.diff (6.2 KB ) - added by hamish 17 years ago.
patch to cleanup /tmp on exit and add flag to enable auto mapset creation

Download all attachments as: .zip

Change History (2)

by hamish, 17 years ago

patch to cleanup /tmp on exit and add flag to enable auto mapset creation

comment:1 by hamish, 17 years ago

Resolution: fixed
Status: newclosed

applied in svn/trunk.

Hamish

Note: See TracTickets for help on using tickets.