[GRASS-SVN] r49893 - in grass/trunk/scripts: . g.extension
g.extension.rebuild.all
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 24 18:04:30 EST 2011
Author: martinl
Date: 2011-12-24 15:04:30 -0800 (Sat, 24 Dec 2011)
New Revision: 49893
Added:
grass/trunk/scripts/g.extension.rebuild.all/
grass/trunk/scripts/g.extension.rebuild.all/Makefile
grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.html
grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.py
Modified:
grass/trunk/scripts/Makefile
grass/trunk/scripts/g.extension/g.extension.html
Log:
new module: g.extension.rebuild.all
Modified: grass/trunk/scripts/Makefile
===================================================================
--- grass/trunk/scripts/Makefile 2011-12-24 17:11:31 UTC (rev 49892)
+++ grass/trunk/scripts/Makefile 2011-12-24 23:04:30 UTC (rev 49893)
@@ -14,6 +14,7 @@
db.out.ogr \
db.test \
g.extension \
+ g.extension.rebuild.all \
g.manual \
i.fusion.brovey \
i.image.mosaic \
Modified: grass/trunk/scripts/g.extension/g.extension.html
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.html 2011-12-24 17:11:31 UTC (rev 49892)
+++ grass/trunk/scripts/g.extension/g.extension.html 2011-12-24 23:04:30 UTC (rev 49893)
@@ -12,9 +12,15 @@
Download and install <em>i.landsat.toar</em> into current GRASS installation:
<div class="code"><pre>
-g.extension extension=i.points.auto operation=add
+g.extension extension=i.points.auto
</pre></div>
+Remove locally installed extension
+
+<div class="code"><pre>
+g.extension extension=i.points.auto operation=remove
+</pre></div>
+
<h2>AUTHOR</h2>
Markus Neteler<br>
Added: grass/trunk/scripts/g.extension.rebuild.all/Makefile
===================================================================
--- grass/trunk/scripts/g.extension.rebuild.all/Makefile (rev 0)
+++ grass/trunk/scripts/g.extension.rebuild.all/Makefile 2011-12-24 23:04:30 UTC (rev 49893)
@@ -0,0 +1,7 @@
+MODULE_TOPDIR = ../..
+
+PGM = g.extension.rebuild.all
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script
Property changes on: grass/trunk/scripts/g.extension.rebuild.all/Makefile
___________________________________________________________________
Added: svn:mime-type
+ text/x-makefile
Added: svn:eol-style
+ native
Added: grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.html
===================================================================
--- grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.html (rev 0)
+++ grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.html 2011-12-24 23:04:30 UTC (rev 49893)
@@ -0,0 +1,31 @@
+<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>
+
+Re-install all locally installed extensions
+
+<div class="code"><pre>
+g.extension.rebuild.all
+</pre></div>
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="g.extension.html">g.extension</a>
+</em>
+
+<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>
Property changes on: grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.html
___________________________________________________________________
Added: svn:mime-type
+ text/html
Added: svn:keywords
+ Author Date Id
Added: svn:eol-style
+ native
Added: grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.py
===================================================================
--- grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.py (rev 0)
+++ grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.py 2011-12-24 23:04:30 UTC (rev 49893)
@@ -0,0 +1,48 @@
+#!/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
+#% description: Rebuilds all locally installed GRASS Addons extensions.
+#% keywords: general
+#% keywords: installation
+#% keywords: extensions
+#%end
+
+import sys
+
+import grass.script as grass
+
+def main():
+ extensions = grass.read_command('g.extension',
+ quiet = True, flags = 'a').splitlines()
+ if not extensions:
+ grass.info(_("No extension installed. 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())
Property changes on: grass/trunk/scripts/g.extension.rebuild.all/g.extension.rebuild.all.py
___________________________________________________________________
Added: svn:mime-type
+ text/x-python
Added: svn:eol-style
+ native
More information about the grass-commit
mailing list