[GRASS-SVN] r45815 - grass/branches/releasebranch_6_4/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 31 08:40:24 EDT 2011
Author: marisn
Date: 2011-03-31 05:40:24 -0700 (Thu, 31 Mar 2011)
New Revision: 45815
Modified:
grass/branches/releasebranch_6_4/lib/init/gis_set.tcl
Log:
gis.m Don't fail on wxGUI broken .grassrc file
Modified: grass/branches/releasebranch_6_4/lib/init/gis_set.tcl
===================================================================
--- grass/branches/releasebranch_6_4/lib/init/gis_set.tcl 2011-03-31 09:51:25 UTC (rev 45814)
+++ grass/branches/releasebranch_6_4/lib/init/gis_set.tcl 2011-03-31 12:40:24 UTC (rev 45815)
@@ -60,14 +60,14 @@
lappend grassrc_list "$thisline"
- if { [regexp -- {^GISDBASE: *(.*)$} $thisline dummy env_database] } {
- set database $env_database
+ if { [regexp -- {^GISDBASE.*:(.*)$} $thisline dummy env_database] } {
+ set database [string trim $env_database]
}
- if { [regexp -- {^LOCATION_NAME: *(.*)$} $thisline dummy env_location] } {
- set location $env_location
+ if { [regexp -- {^LOCATION_NAME.*:(.*)$} $thisline dummy env_location] } {
+ set location [string trim $env_location]
}
- if { [regexp -- {^MAPSET: *(.*)$} $thisline dummy env_mapset] } {
- set mapset $env_mapset
+ if { [regexp -- {^MAPSET.*:(.*)$} $thisline dummy env_mapset] } {
+ set mapset [string trim $env_mapset]
}
set thisline [gets $ifp]
}
@@ -96,11 +96,11 @@
set ofp [open $filename "w"]
foreach i $grassrc_list {
- if { [regexp {^GISDBASE:} $i] } {
+ if { [regexp {^GISDBASE.*:} $i] } {
puts $ofp "GISDBASE: $database"
- } elseif { [regexp {^LOCATION_NAME:} $i] } {
+ } elseif { [regexp {^LOCATION_NAME.*:} $i] } {
puts $ofp "LOCATION_NAME: $location"
- } elseif { [regexp {^MAPSET:} $i] } {
+ } elseif { [regexp {^MAPSET.*:} $i] } {
puts $ofp "MAPSET: $mapset"
} else {
puts $ofp $i
More information about the grass-commit
mailing list