[GRASS-SVN] r51404 - in grass/trunk: lib/init scripts/g.manual
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 12 18:19:03 EDT 2012
Author: martinl
Date: 2012-04-12 15:19:03 -0700 (Thu, 12 Apr 2012)
New Revision: 51404
Modified:
grass/trunk/lib/init/grass.py
grass/trunk/scripts/g.manual/g.manual.py
Log:
define MANPATH also for addons (GRASS_ADDON_BASE)
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2012-04-12 22:06:21 UTC (rev 51403)
+++ grass/trunk/lib/init/grass.py 2012-04-12 22:19:03 UTC (rev 51404)
@@ -343,8 +343,10 @@
# set path for the GRASS man pages
grass_man_path = os.path.join(gisbase, 'docs', 'man')
+ addons_man_path = os.path.join(addon_base, 'docs', 'man')
man_path = os.getenv('MANPATH')
if man_path:
+ path_prepend(addons_man_path, 'MANPATH')
path_prepend(grass_man_path, 'MANPATH')
else:
try:
@@ -354,14 +356,17 @@
sys_man_path = s.strip()
except:
pass
-
+
if sys_man_path:
os.environ['MANPATH'] = sys_man_path
+ path_prepend(addons_man_path, 'MANPATH')
path_prepend(grass_man_path, 'MANPATH')
else:
- os.environ['MANPATH'] = grass_man_path
-
- # Add .py (Python) to list of executable extensions to search for in MS-Windows PATH
+ os.environ['MANPATH'] = addons_man_path
+ path_prepend(os.path.join(grass_man_path, 'MANPATH'))
+
+ # Add .py (Python) to list of executable extensions to search for
+ # in MS-Windows PATH
if windows:
path_append('.PY', 'PATHEXT')
Modified: grass/trunk/scripts/g.manual/g.manual.py
===================================================================
--- grass/trunk/scripts/g.manual/g.manual.py 2012-04-12 22:06:21 UTC (rev 51403)
+++ grass/trunk/scripts/g.manual/g.manual.py 2012-04-12 22:19:03 UTC (rev 51404)
@@ -58,8 +58,8 @@
def start_man(entry):
path = os.path.join(gisbase, 'docs', 'man', 'man1', entry + '.1')
- if not os.path.exists(path) and os.getenv('GRASS_ADDON_PATH'):
- path = os.path.join(os.getenv('GRASS_ADDON_PATH'), 'man', 'man1', entry + '.1')
+ if not os.path.exists(path) and os.getenv('GRASS_ADDON_BASE'):
+ path = os.path.join(os.getenv('GRASS_ADDON_BASE'), 'docs', 'man', 'man1', entry + '.1')
for ext in ['', '.gz', '.bz2']:
if os.path.exists(path + ext):
More information about the grass-commit
mailing list