[GRASS-SVN] r63499 - grass-addons/tools/addons

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 12 06:07:13 PST 2014


Author: martinl
Date: 2014-12-12 06:07:13 -0800 (Fri, 12 Dec 2014)
New Revision: 63499

Added:
   grass-addons/tools/addons/grass-addons-index.sh
   grass-addons/tools/addons/grass-addons-publish.sh
Log:
add missing script for compiling & publishing addons

Added: grass-addons/tools/addons/grass-addons-index.sh
===================================================================
--- grass-addons/tools/addons/grass-addons-index.sh	                        (rev 0)
+++ grass-addons/tools/addons/grass-addons-index.sh	2014-12-12 14:07:13 UTC (rev 63499)
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Markus Neteler 9/2002
+# updated for GRASS GIS Addons by Markus Neteler and Martin Landa, 2013
+
+# Generates index.html for existing directory
+
+generate () {
+    major=$1
+    minor=$2
+
+    cd /osgeo/grass/grass-cms/grass${major}${minor}/manuals/addons
+
+    if test -f index.html ; then
+	mv index.html index.html.bak
+    fi
+
+    TMP=$$
+
+    echo "<html>
+<head>
+ <title>GRASS GIS ${major} Addons Manual pages</title>
+ <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
+ <meta name=\"Author\" content=\"GRASS Development Team\">
+ <link rel=\"stylesheet\" href=\"../grassdocs.css\" type=\"text/css\">
+</head>
+<body bgcolor=\"#FFFFFF\">
+<h2>GRASS GIS ${major} Addons Manual pages</h2>
+
+<!-- Generated from: /home/martinl/cronjobs/make_grass7_addons_index.sh -->
+
+<a href=\"http://grass.osgeo.org\">GRASS GIS</a> is free software,
+anyone may develop his/her own extensions.  The <a
+href=\"http://grasswiki.osgeo.org/wiki/AddOns/GRASS_${major}\">GRASS GIS
+Add-ons Wiki page</a> contains a growing list of links to GRASS GIS
+extensions, which are currently not part of the standard
+distribution. They can be easily added to the local installation
+through the graphical user interface (<i>Menu - Settings - Addons
+Extension - Install</i>) or via the <a
+href=\"../g.extension.html\">g.extension</a> command.  <p> <i>These
+manual pages are updated daily.</i>
+<p> How to contribute?
+<p> Please upload your add-ons to <strong>GRASS Add-ons
+repository</strong>.  Further details about gaining access to our SVN
+repository can be found in <a
+href=\"http://trac.osgeo.org/grass/wiki/HowToContribute#WriteaccesstotheGRASS-Addons-SVNrepository\">this
+document</a>.
+<p>
+See also: <a href=\"http://wingrass.fsv.cvut.cz/grass70/addons/grass-7.0.0svn/logs/\">log files</a> of compilation.
+<p>
+<hr> <ul>" > index.html
+
+    ls -1 *.html | sed 's/^/\<li style=\"margin-left: 20px\"\>\<a href=/g' | sed 's/$/\>/g' > /tmp/a.$TMP
+
+    ls -1 *.html | sed 's/\.html$/\<\/a\>\<\/li\>/g' > /tmp/b.$TMP
+
+    echo "</ul>" >> index.html
+
+# get one-line perhaps like this:
+## awk '/NAME/,/KEYWORDS/' | grep ' - ' *.html
+
+# size
+# ls -sh *.html | sed 's/^\ //g' | grep -v total | cut -d' ' -f1 | sed 's/$/\<br\>/g'> /tmp/c.$TMP
+# paste -d' ' /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP >> index.html
+
+    paste -d' ' /tmp/a.$TMP /tmp/b.$TMP >> index.html
+
+    echo "<hr>
+© 2013-2014 <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${major} Addons Reference Manual<br>" >> index.html
+    echo "<i><small>`date -u`</small></i>" >> index.html
+    echo "</body></html>" >> index.html
+    rm -f /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP
+}
+
+generate 7 0
+generate 6 4
+
+exit 0


Property changes on: grass-addons/tools/addons/grass-addons-index.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native

Added: grass-addons/tools/addons/grass-addons-publish.sh
===================================================================
--- grass-addons/tools/addons/grass-addons-publish.sh	                        (rev 0)
+++ grass-addons/tools/addons/grass-addons-publish.sh	2014-12-12 14:07:13 UTC (rev 63499)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+URL=http://geo102.fsv.cvut.cz/grass/addons/
+ADDONS=${HOME}/src/grass-addons/tools/addons
+
+process () {
+    major=$1
+    minor=$2
+    wget -q $URL/grass${major}/modules.xml -O /osgeo/grass/grass-cms/addons/grass${major}/modules.xml
+    wget -q $URL/grass${major}/logs.tar.gz -O logs.tar.gz
+    wget -q $URL/grass${major}/html.tar.gz -O html.tar.gz
+
+    tar xzf logs.tar.gz
+    rm -rf /osgeo/grass/grass-cms/addons/grass${major}/logs
+    mv logs /osgeo/grass/grass-cms/addons/grass${major}/
+
+    tar xzf html.tar.gz
+    rm -rf /osgeo/grass/grass-cms/grass${major}${minor}/manuals/addons
+    mv addons /osgeo/grass/grass-cms/grass${major}${minor}/manuals/
+    rm logs.tar.gz
+    rm html.tar.gz
+}
+
+process 7 0
+process 6 4 
+
+${ADDONS}/grass-addons-index.sh
+
+exit 0


Property changes on: grass-addons/tools/addons/grass-addons-publish.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native



More information about the grass-commit mailing list