[GRASS-SVN] r46689 - grass/branches/develbranch_6/gui/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 13 13:41:13 EDT 2011
Author: martinl
Date: 2011-06-13 10:41:13 -0700 (Mon, 13 Jun 2011)
New Revision: 46689
Modified:
grass/branches/develbranch_6/gui/scripts/g.extension.py
Log:
g.extension: update to install scripts
(merge r46686 from trunk)
Modified: grass/branches/develbranch_6/gui/scripts/g.extension.py
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.extension.py 2011-06-13 17:35:24 UTC (rev 46688)
+++ grass/branches/develbranch_6/gui/scripts/g.extension.py 2011-06-13 17:41:13 UTC (rev 46689)
@@ -330,14 +330,16 @@
html_dir = os.path.join(docs_dir, 'html')
man_dir = os.path.join(tmpdir, options['extension'], 'man')
man1_dir = os.path.join(man_dir, 'man1')
- for d in (bin_dir, docs_dir, html_dir, man_dir, man1_dir):
+ script_dir = os.path.join(tmpdir, options['extension'], 'scripts')
+ for d in (bin_dir, docs_dir, html_dir, man_dir, man1_dir, script_dir):
os.mkdir(d)
-
+
ret = grass.call(['make',
'MODULE_TOPDIR=%s' % gisbase.replace(' ', '\ '),
'BIN=%s' % bin_dir,
'HTMLDIR=%s' % html_dir,
- 'MANDIR=%s' % man1_dir],
+ 'MANDIR=%s' % man1_dir,
+ 'SCRIPTDIR=%s' % script_dir],
stdout = outdev)
else:
ret = grass.call(['make',
@@ -392,6 +394,7 @@
create_dir(os.path.join(options['prefix'], 'bin'))
create_dir(os.path.join(options['prefix'], 'docs', 'html'))
create_dir(os.path.join(options['prefix'], 'man', 'man1'))
+ create_dir(os.path.join(options['prefix'], 'scripts'))
def main():
# check dependecies
@@ -413,6 +416,8 @@
not os.environ['GRASS_ADDON_PATH']:
grass.warning(_("GRASS_ADDON_PATH is not defined, installing to ~/.grass7/addons/"))
options['prefix'] = os.path.join(os.environ['HOME'], '.grass7', 'addons')
+ else:
+ options['prefix'] = os.environ['GRASS_ADDON_PATH']
# check dirs
check_dirs()
More information about the grass-commit
mailing list