[GRASS-SVN] r70514 - in grass/trunk: scripts/g.extension tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 9 03:06:12 PST 2017
Author: martinl
Date: 2017-02-09 03:06:12 -0800 (Thu, 09 Feb 2017)
New Revision: 70514
Modified:
grass/trunk/scripts/g.extension/g.extension.py
grass/trunk/tools/mkhtml.py
Log:
broken links to source code and history in add-ons user manuals (see #3224)
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2017-02-09 10:33:59 UTC (rev 70513)
+++ grass/trunk/scripts/g.extension/g.extension.py 2017-02-09 11:06:12 UTC (rev 70514)
@@ -1170,7 +1170,8 @@
'SCRIPTDIR=%s' % dirs['script'],
'STRINGDIR=%s' % dirs['string'],
'ETC=%s' % os.path.join(dirs['etc']),
- 'SOURCE_URL=%s' % source_url
+ 'SOURCE_URL=%s' % source_url,
+ 'BASEDIR=%s' % TMPDIR,
]
install_cmd = [
Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py 2017-02-09 10:33:59 UTC (rev 70513)
+++ grass/trunk/tools/mkhtml.py 2017-02-09 11:06:12 UTC (rev 70514)
@@ -317,7 +317,7 @@
pgmdir = curdir.replace(topdir, '').lstrip('/')
if os.getenv('SOURCE_URL', ''):
# addons
- pgmname = os.path.basename(pgmdir)
+ pgmname = os.getcwd()[len(os.environ['BASEDIR'])+1:]
classname = index_names[pgmname[:pgmname.find('.')]]
url_source = urlparse.urljoin('{0}{1}/'.format(os.environ['SOURCE_URL'], classname),
pgmname)
More information about the grass-commit
mailing list