[GRASS-SVN] r57087 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 13 09:43:01 PDT 2013
Author: ychemin
Date: 2013-07-13 09:43:01 -0700 (Sat, 13 Jul 2013)
New Revision: 57087
Modified:
grass/trunk/lib/init/grass.py
Log:
If ISIS is installed, run ISIS-GRASS bridge
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2013-07-13 16:40:12 UTC (rev 57086)
+++ grass/trunk/lib/init/grass.py 2013-07-13 16:43:01 UTC (rev 57087)
@@ -724,6 +724,17 @@
except:
continue
os.environ[k] = v
+ # Allow for mixed ISIS-GRASS Environment
+ if os.getenv('ISISROOT'):
+ isis = os.getenv('ISISROOT')
+ os.environ['ISIS_LIB'] = isis + "/lib"
+ os.environ['ISIS_3RDPARTY'] = isis + "/3rdParty/lib"
+ os.environ['QT_PLUGIN_PATH'] = isis + "/3rdParty/plugins"
+ #os.environ['ISIS3DATA'] = isis + "$ISIS3DATA"
+ libpath = os.getenv('LD_LIBRARY_PATH')
+ isislibpath = os.getenv('ISIS_LIB')
+ isis3rdparty = os.getenv('ISIS_3RDPARTY')
+ os.environ['LD_LIBRARY_PATH'] = libpath + ":" + isislibpath + ":" + isis3rdparty
def set_language():
@@ -1022,7 +1033,10 @@
f = open(bashrc, 'w')
f.write("test -r ~/.alias && . ~/.alias\n")
- f.write("PS1='GRASS %s (%s):\w > '\n" % (grass_version, location_name))
+ if os.getenv('ISISROOT'):
+ f.write("PS1='ISIS-GRASS %s (%s):\w > '\n" % (grass_version, location_name))
+ else:
+ f.write("PS1='GRASS %s (%s):\w > '\n" % (grass_version, location_name))
f.write("PROMPT_COMMAND=\"'%s'\"\n" % os.path.join(gisbase, 'etc',
'prompt.py'))
More information about the grass-commit
mailing list