[GRASS-SVN] r43950 - grass/trunk/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 17 07:20:52 EDT 2010
Author: martinl
Date: 2010-10-17 04:20:52 -0700 (Sun, 17 Oct 2010)
New Revision: 43950
Modified:
grass/trunk/scripts/g.extension/g.extension.py
Log:
g.extension: new flag to skip installing extension
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2010-10-17 10:10:39 UTC (rev 43949)
+++ grass/trunk/scripts/g.extension/g.extension.py 2010-10-17 11:20:52 UTC (rev 43950)
@@ -76,6 +76,10 @@
#% key: d
#% description: Don't delete downloaded source code when installing new extension
#%end
+#%flag
+#% key: i
+#% description: Don't install new extension, just compile it
+#%end
import os
import sys
@@ -246,7 +250,7 @@
else:
grass.info(_("Path to the source code: '%s'") % tmpdir)
-def install_extension(svnurl, prefix, module):
+def install_extension(svnurl, prefix, module, no_install):
gisbase = os.getenv('GISBASE')
if not gisbase:
grass.fatal(_('$GISBASE not defined'))
@@ -291,6 +295,9 @@
stdout = outdev) != 0:
grass.fatal(_('Compilation failed, sorry. Please check above error messages.'))
+ if no_install:
+ return
+
grass.message(_("Installing '%s'...") % module)
# can we write ?
try:
@@ -376,7 +383,7 @@
remove_tmpdir = False
if options['operation'] == 'add':
- install_extension(options['svnurl'], options['prefix'], options['extension'])
+ install_extension(options['svnurl'], options['prefix'], options['extension'], flags['i'])
else: # remove
remove_extension(options['prefix'], options['extension'])
More information about the grass-commit
mailing list