[GRASS-SVN] r46686 - grass/trunk/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 13 13:33:33 EDT 2011
Author: martinl
Date: 2011-06-13 10:33:33 -0700 (Mon, 13 Jun 2011)
New Revision: 46686
Modified:
grass/trunk/scripts/g.extension/g.extension.py
Log:
g.extension: update to install scripts
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2011-06-13 16:46:01 UTC (rev 46685)
+++ grass/trunk/scripts/g.extension/g.extension.py 2011-06-13 17:33:33 UTC (rev 46686)
@@ -332,14 +332,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',
@@ -394,6 +396,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
@@ -415,6 +418,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