[GRASS-SVN] r47961 - grass/branches/develbranch_6/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 29 16:00:59 EDT 2011
Author: mmetz
Date: 2011-08-29 13:00:59 -0700 (Mon, 29 Aug 2011)
New Revision: 47961
Modified:
grass/branches/develbranch_6/lib/init/init.sh
Log:
simplify code, create rc basedir of not existing
Modified: grass/branches/develbranch_6/lib/init/init.sh
===================================================================
--- grass/branches/develbranch_6/lib/init/init.sh 2011-08-29 19:52:19 UTC (rev 47960)
+++ grass/branches/develbranch_6/lib/init/init.sh 2011-08-29 20:00:59 UTC (rev 47961)
@@ -160,23 +160,23 @@
GIS_LOCK=$$
export GIS_LOCK
+if [ "$MINGW" ] ; then
+ GISRC_BASEDIR="$APPDATA/grass6"
+else
+ GISRC_BASEDIR="$HOME/.grass6"
+fi
+if [ ! -d "$GISRC_BASEDIR" ] ; then
+ mkdir "$GISRC_BASEDIR"
+fi
+
# Set the global grassrc file
if [ -n "$GRASS_BATCH_JOB" ] ; then
- if [ "$MINGW" ] ; then
- GISRCRC="$APPDATA/grassrc6/rc.`uname -n`"
- else
- GISRCRC="$HOME/.grass6/rc.`uname -n`"
+ GISRCRC="$GISRC_BASEDIR/rc.`uname -n`"
if [ ! -f "$GISRCRC" ] ; then
- if [ "$MINGW" ] ; then
- GISRCRC="$APPDATA/grass6/rc"
- else
- GISRCRC="$HOME/.grass6/rc"
+ GISRCRC="$GISRC_BASEDIR/rc"
fi
else
- if [ "$MINGW" ] ; then
- GISRCRC="$APPDATA/grass6/rc"
- else
- GISRCRC="$HOME/.grass6/rc"
+ GISRCRC="$GISRC_BASEDIR/rc"
fi
# Set the session grassrc file
@@ -1051,7 +1051,6 @@
# Save GISRC
cp "$GISRC" "$GISRCRC"
-
cleanup_tmp
#### after this point no more grass modules may be called ####
More information about the grass-commit
mailing list