[GRASS-SVN] r47948 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 29 14:32:00 EDT 2011
Author: mmetz
Date: 2011-08-29 11:32:00 -0700 (Mon, 29 Aug 2011)
New Revision: 47948
Modified:
grass/trunk/lib/init/Makefile
grass/trunk/lib/init/grass.py
Log:
lib/init: fix grass_config_dir
Modified: grass/trunk/lib/init/Makefile
===================================================================
--- grass/trunk/lib/init/Makefile 2011-08-29 17:59:27 UTC (rev 47947)
+++ grass/trunk/lib/init/Makefile 2011-08-29 18:32:00 UTC (rev 47948)
@@ -74,7 +74,6 @@
-e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#' \
-e 's#@START_UP@#$(START_UP)#' \
-e 's#@CONFIG_PROJSHARE@#$(PROJSHARE)#' \
- -e 's#@GRASS_CONFIG_DIR@#$(GRASS_CONFIG_DIR)#' \
$< > $@
chmod +x $@
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2011-08-29 17:59:27 UTC (rev 47947)
+++ grass/trunk/lib/init/grass.py 2011-08-29 18:32:00 UTC (rev 47948)
@@ -43,8 +43,14 @@
config_projshare = os.environ['GRASS_PROJSHARE']
else:
config_projshare = "@CONFIG_PROJSHARE@"
-grass_config_dirname = "@GRASS_CONFIG_DIR@"
+if sys.platform == 'win32':
+ grass_config_dirname = "grass7"
+ grass_config_dir = os.path.join(os.getenv('APPDATA'), grass_config_dirname)
+else:
+ grass_config_dirname = ".grass7"
+ grass_config_dir = os.path.join(os.getenv('HOME'), grass_config_dirname)
+
gisbase = os.path.normpath(gisbase)
# i18N
@@ -958,8 +964,6 @@
if not os.getenv('SHELL'):
os.environ['SHELL'] = os.getenv('COMSPEC', 'cmd.exe')
-grass_config_dir = os.path.join(os.getenv('HOME'), grass_config_dirname)
-
atexit.register(cleanup)
# Set default GUI
More information about the grass-commit
mailing list