Ticket #53 (closed task: fixed)

Opened 4 years ago

Last modified 4 years ago

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:
Platform: CPU:

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

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

Change History

Changed 4 years ago by hamish

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

Changed 4 years ago by hamish

  • status changed from new to closed
  • resolution set to fixed

applied in svn/trunk.

Hamish

Note: See TracTickets for help on using tickets.