[GRASS-SVN] r55901 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 18 09:20:01 PDT 2013
Author: martinl
Date: 2013-04-18 09:20:01 -0700 (Thu, 18 Apr 2013)
New Revision: 55901
Modified:
grass/trunk/lib/init/grass.py
Log:
grass.py: fix for cmd.exe
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2013-04-18 13:54:37 UTC (rev 55900)
+++ grass/trunk/lib/init/grass.py 2013-04-18 16:20:01 UTC (rev 55901)
@@ -46,14 +46,13 @@
config_projshare = "@CONFIG_PROJSHARE@"
# configuration directory
+grass_env_file = None # see check_shell()
if sys.platform == 'win32':
grass_config_dirname = "GRASS7"
grass_config_dir = os.path.join(os.getenv('APPDATA'), grass_config_dirname)
- grass_env_file = os.path.join(grass_config_dir, 'env.bat')
else:
grass_config_dirname = ".grass7"
grass_config_dir = os.path.join(os.getenv('HOME'), grass_config_dirname)
- grass_env_file = None # see check_shell()
gisbase = os.path.normpath(gisbase)
@@ -782,6 +781,8 @@
shellname = "Bourne Shell"
elif sh == "zsh":
shellname = "Z Shell"
+ elif sh == "cmd.exe":
+ shellname = "Command Shell"
else:
shellname = "shell"
@@ -789,8 +790,10 @@
grass_env_file = os.path.join(grass_config_dir, 'cshrc')
elif sh in ['bash', 'msh', 'cygwin']:
grass_env_file = os.path.join(grass_config_dir, 'bashrc')
- elif sh in ['zsh']:
+ elif sh == 'zsh':
grass_env_file = os.path.join(grass_config_dir, 'zshrc')
+ elif sh == 'cmd.exe':
+ grass_env_file = os.path.join(grass_config_dir, 'env.bat')
else:
grass_env_file = os.path.join(grass_config_dir, 'bashrc')
warning(_("Unsupported shell <%s>: %s") % (sh, grass_env_file))
More information about the grass-commit
mailing list