[GRASS-SVN] r57393 - grass/trunk/scripts/g.extension.all

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Aug 4 05:29:21 PDT 2013


Author: martinl
Date: 2013-08-04 05:29:21 -0700 (Sun, 04 Aug 2013)
New Revision: 57393

Added:
   grass/trunk/scripts/g.extension.all/g.extension.all.html
   grass/trunk/scripts/g.extension.all/g.extension.all.py
Removed:
   grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.html
   grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.py
Modified:
   grass/trunk/scripts/g.extension.all/Makefile
Log:
rename g.extension.rebuild.all to g.extension.all (step 2)

Modified: grass/trunk/scripts/g.extension.all/Makefile
===================================================================
--- grass/trunk/scripts/g.extension.all/Makefile	2013-08-04 12:28:23 UTC (rev 57392)
+++ grass/trunk/scripts/g.extension.all/Makefile	2013-08-04 12:29:21 UTC (rev 57393)
@@ -1,6 +1,6 @@
 MODULE_TOPDIR = ../..
 
-PGM = g.extension.rebuild.all
+PGM = g.extension.all
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
 

Copied: grass/trunk/scripts/g.extension.all/g.extension.all.html (from rev 57392, grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.html)
===================================================================
--- grass/trunk/scripts/g.extension.all/g.extension.all.html	                        (rev 0)
+++ grass/trunk/scripts/g.extension.all/g.extension.all.html	2013-08-04 12:29:21 UTC (rev 57393)
@@ -0,0 +1,41 @@
+<h2>DESCRIPTION</h2>
+
+<em>g.extension.rebuild.all</em> reinstalls and updates all locally
+installed GRASS Addons extensions in local GRASS installation. The
+extensions can be installed
+by <em><a href="g.extension.html">g.extension</a></em>. List of
+locally installed extensions can be printed by <tt>g.extension
+-a</tt>.
+
+<h2>EXAMPLES</h2>
+
+Rebuild locally installed extensions which were built against
+different GIS Library (see <tt>g.version -r</tt>)
+
+<div class="code"><pre>
+g.extension.rebuild.all
+</pre></div>
+
+Force to rebuild all locally installed extensions
+
+<div class="code"><pre>
+g.extension.rebuild.all -f
+</pre></div>
+
+<h2>SEE ALSO</h2>
+
+<em>
+  <a href="g.extension.html">g.extension</a>
+</em>
+
+<p>
+See also <a href="http://grasswiki.osgeo.org/wiki/GRASS_AddOns">GRASS Addons</a> wiki page.
+
+<h2>AUTHOR</h2>
+
+<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin
+Landa</a>, <a href="http://www.cvut.cz">Czech Technical University in
+Prague</a>, Czech Republic
+
+<p>
+<i>Last changed: $Date$</i>

Copied: grass/trunk/scripts/g.extension.all/g.extension.all.py (from rev 57392, grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.py)
===================================================================
--- grass/trunk/scripts/g.extension.all/g.extension.all.py	                        (rev 0)
+++ grass/trunk/scripts/g.extension.all/g.extension.all.py	2013-08-04 12:29:21 UTC (rev 57393)
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE:       g.extension.rebuild.all
+#
+# AUTHOR(S):   	Martin Landa <landa.martin gmail.com>
+#
+# PURPOSE:      Rebuild locally installed GRASS Addons extensions 
+#
+# COPYRIGHT:    (C) 2011 by Martin Landa, and the GRASS Development Team
+#
+#               This program is free software under the GNU General
+#               Public License (>=v2). Read the file COPYING that
+#               comes with GRASS for details.
+#
+#############################################################################
+
+#%module
+#% label: Rebuilds all locally installed GRASS Addons extensions.
+#% description: By default only extensions built against different GIS Library are rebuilt.
+#% keywords: general
+#% keywords: installation
+#% keywords: extensions
+#%end
+#%flag
+#% key: f
+#% description: Force to rebuild all extensions
+#% end
+
+import os
+import sys
+
+try:
+    import xml.etree.ElementTree as etree
+except ImportError:
+    import elementtree.ElementTree as etree # Python <= 2.4
+
+import grass.script as grass
+
+def get_extensions():
+    addon_base = os.getenv('GRASS_ADDON_BASE')
+    if not addon_base:
+        grass.fatal(_("%s not defined") % "GRASS_ADDON_BASE")
+    fXML = os.path.join(addon_base, 'modules.xml')
+    if not os.path.exists(fXML):
+        return []
+
+    # read XML file
+    fo = open(fXML, 'r')
+    try:
+        tree = etree.fromstring(fo.read())
+    except StandardError, e:
+        grass.error(_("Unable to parse metadata file: %s") % e)
+        fo.close()
+        return []
+    
+    fo.close()
+    
+    libgis_rev = grass.version()['libgis_revision']
+    ret = list()
+    for tnode in tree.findall('task'):
+        gnode = tnode.find('libgis')
+        if gnode is not None and \
+                gnode.get('revision', '') != libgis_rev:
+            ret.append(tnode.get('name'))
+    
+    return ret
+
+def main():
+    if flags['f']:
+        extensions = grass.read_command('g.extension',
+                                        quiet = True, flags = 'a').splitlines()
+    else:
+        extensions = get_extensions()
+    
+    if not extensions:
+        grass.info(_("Nothing to rebuild."))
+        return 0
+    
+    for ext in extensions:
+        grass.message('-' * 60)
+        grass.message(_("Reinstalling extension <%s>...") % ext)
+        grass.message('-' * 60)
+        grass.run_command('g.extension',
+                          extension = ext)
+    
+    return 0
+
+if __name__ == "__main__":
+    options, flags = grass.parser()
+    sys.exit(main())

Deleted: grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.html
===================================================================
--- grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.html	2013-08-04 12:28:23 UTC (rev 57392)
+++ grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.html	2013-08-04 12:29:21 UTC (rev 57393)
@@ -1,41 +0,0 @@
-<h2>DESCRIPTION</h2>
-
-<em>g.extension.rebuild.all</em> reinstalls and updates all locally
-installed GRASS Addons extensions in local GRASS installation. The
-extensions can be installed
-by <em><a href="g.extension.html">g.extension</a></em>. List of
-locally installed extensions can be printed by <tt>g.extension
--a</tt>.
-
-<h2>EXAMPLES</h2>
-
-Rebuild locally installed extensions which were built against
-different GIS Library (see <tt>g.version -r</tt>)
-
-<div class="code"><pre>
-g.extension.rebuild.all
-</pre></div>
-
-Force to rebuild all locally installed extensions
-
-<div class="code"><pre>
-g.extension.rebuild.all -f
-</pre></div>
-
-<h2>SEE ALSO</h2>
-
-<em>
-  <a href="g.extension.html">g.extension</a>
-</em>
-
-<p>
-See also <a href="http://grasswiki.osgeo.org/wiki/GRASS_AddOns">GRASS Addons</a> wiki page.
-
-<h2>AUTHOR</h2>
-
-<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin
-Landa</a>, <a href="http://www.cvut.cz">Czech Technical University in
-Prague</a>, Czech Republic
-
-<p>
-<i>Last changed: $Date$</i>

Deleted: grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.py
===================================================================
--- grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.py	2013-08-04 12:28:23 UTC (rev 57392)
+++ grass/trunk/scripts/g.extension.all/g.extension.rebuild.all.py	2013-08-04 12:29:21 UTC (rev 57393)
@@ -1,92 +0,0 @@
-#!/usr/bin/env python
-
-############################################################################
-#
-# MODULE:       g.extension.rebuild.all
-#
-# AUTHOR(S):   	Martin Landa <landa.martin gmail.com>
-#
-# PURPOSE:      Rebuild locally installed GRASS Addons extensions 
-#
-# COPYRIGHT:    (C) 2011 by Martin Landa, and the GRASS Development Team
-#
-#               This program is free software under the GNU General
-#               Public License (>=v2). Read the file COPYING that
-#               comes with GRASS for details.
-#
-#############################################################################
-
-#%module
-#% label: Rebuilds all locally installed GRASS Addons extensions.
-#% description: By default only extensions built against different GIS Library are rebuilt.
-#% keywords: general
-#% keywords: installation
-#% keywords: extensions
-#%end
-#%flag
-#% key: f
-#% description: Force to rebuild all extensions
-#% end
-
-import os
-import sys
-
-try:
-    import xml.etree.ElementTree as etree
-except ImportError:
-    import elementtree.ElementTree as etree # Python <= 2.4
-
-import grass.script as grass
-
-def get_extensions():
-    addon_base = os.getenv('GRASS_ADDON_BASE')
-    if not addon_base:
-        grass.fatal(_("%s not defined") % "GRASS_ADDON_BASE")
-    fXML = os.path.join(addon_base, 'modules.xml')
-    if not os.path.exists(fXML):
-        return []
-
-    # read XML file
-    fo = open(fXML, 'r')
-    try:
-        tree = etree.fromstring(fo.read())
-    except StandardError, e:
-        grass.error(_("Unable to parse metadata file: %s") % e)
-        fo.close()
-        return []
-    
-    fo.close()
-    
-    libgis_rev = grass.version()['libgis_revision']
-    ret = list()
-    for tnode in tree.findall('task'):
-        gnode = tnode.find('libgis')
-        if gnode is not None and \
-                gnode.get('revision', '') != libgis_rev:
-            ret.append(tnode.get('name'))
-    
-    return ret
-
-def main():
-    if flags['f']:
-        extensions = grass.read_command('g.extension',
-                                        quiet = True, flags = 'a').splitlines()
-    else:
-        extensions = get_extensions()
-    
-    if not extensions:
-        grass.info(_("Nothing to rebuild."))
-        return 0
-    
-    for ext in extensions:
-        grass.message('-' * 60)
-        grass.message(_("Reinstalling extension <%s>...") % ext)
-        grass.message('-' * 60)
-        grass.run_command('g.extension',
-                          extension = ext)
-    
-    return 0
-
-if __name__ == "__main__":
-    options, flags = grass.parser()
-    sys.exit(main())



More information about the grass-commit mailing list