[GRASS-SVN] r60886 - grass-addons/tools/addons
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 20 04:26:45 PDT 2014
Author: martinl
Date: 2014-06-20 04:26:45 -0700 (Fri, 20 Jun 2014)
New Revision: 60886
Modified:
grass-addons/tools/addons/build-index.sh
grass-addons/tools/addons/grass-addons.sh
Log:
update grass-addons support scripts
Modified: grass-addons/tools/addons/build-index.sh
===================================================================
--- grass-addons/tools/addons/build-index.sh 2014-06-20 11:25:56 UTC (rev 60885)
+++ grass-addons/tools/addons/build-index.sh 2014-06-20 11:26:45 UTC (rev 60886)
@@ -5,33 +5,41 @@
# Generates index.html for existing directory
-cd /osgeo/grass/grass-cms/grass70/manuals/addons
+if test -z "$1" ; then
+ echo "Missing DEST"
+ exit 1
+fi
+DEST="$1"
+MAJOR="$2"
+MINOR="$3"
+
+cd $DEST/grass${MAJOR}${MINOR}/manuals/addons
+
if test -f index.html ; then
mv index.html index.html.bak
- echo "index.html saved to index.html.bak"
fi
TMP=$$
echo "<html>
<head>
- <title>GRASS GIS 7 Addons Manual pages</title>
+ <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\">
+ <link rel=\"stylesheet\" href=\"grassdocs.css\" type=\"text/css\">
</head>
-<body bgcolor=\"#FFFFFF\">
-<h2>GRASS GIS 7 Addons Manual pages</h2>
+<body width=\"100%\">
+<h1>GRASS GIS ${MAJOR} Addons Manual pages</h1>
-GRASS GIS is free software, anyone may develop his/her own extensions.
-The <a href=\"http://grasswiki.osgeo.org/wiki/AddOns/GRASS_7\">GRASS GIS Add-ons Wiki page</a>
+<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
-(Menu - Settings - Addons Extension - Install) or via the "g.extension" command.
+(Menu - Settings - Addons Extension - Install) or via the <a href=\"http://grass.osgeo.org/grass${MAJOR}${MINOR}/manuals/g.extension.html\">g.extension</a> command.
<p>
-<i>These manual pages are updated weekly.</i>
+<i>These manual pages are updated regularly.</i>
<p>
How to contribute?
<p>
@@ -40,9 +48,10 @@
<a href=\"http://trac.osgeo.org/grass/wiki/HowToContribute#WriteaccesstotheGRASS-Addons-SVNrepository\">this document</a>.
<p>
<hr>
+<ul>
" > index.html
-ls -1 *.html | sed 's/^/\<a href=/g' | sed 's/$/\>/g' > /tmp/a.$TMP
-ls -1 *.html | sed 's/$/\<\/a\>\<br\>/g' > /tmp/b.$TMP
+ls -1 *.html | sed 's/^/\<li style=\"padding: 5px\"\>\<a href=/g' | sed 's/$/\>/g' > /tmp/a.$TMP
+ls -1 *.html | sed 's/$/\<\/a\>\<\/li\>/g' | sed 's/.html//g' > /tmp/b.$TMP
# get one-line perhaps like this:
## awk '/NAME/,/KEYWORDS/' | grep ' - ' *.html
@@ -53,11 +62,11 @@
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 7 Addons Reference Manual<br>" >> index.html
-echo "<i><small>`date -u`</small></i>" >> index.html
+year=`date +%Y`
+echo "</ul><hr>
+© 2013-${year} <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS 7 Addons Reference Manual<br>" >> index.html
+echo "<i>`date -u`</i>" >> index.html
echo "</body></html>" >> index.html
rm -f /tmp/a.$TMP /tmp/b.$TMP /tmp/c.$TMP
-echo "written index.html"
exit 0
Modified: grass-addons/tools/addons/grass-addons.sh
===================================================================
--- grass-addons/tools/addons/grass-addons.sh 2014-06-20 11:25:56 UTC (rev 60885)
+++ grass-addons/tools/addons/grass-addons.sh 2014-06-20 11:26:45 UTC (rev 60886)
@@ -25,13 +25,12 @@
./compile-xml.sh $XMLDIR
for version in 6 7 ; do
cd $HOME/.grass${version}/addons/
- cp modules.xml $XMLDIR/grass${version}/
- rsync -ag --delete logs $XMLDIR/grass${version}/
+ cp modules.xml $XMLDIR/grass${version}
+ rsync -ag --delete logs $XMLDIR/grass${version}
cd $XMLDIR/grass${version}/logs
ln -sf ALL.html index.html
done
- update_manual 7 1
update_manual 7 0
update_manual 6 4
fi
@@ -40,7 +39,7 @@
recompile_grass() {
cd $DIR
- for gdir in "grass_trunk" "grass70_release" "grass64_release" ; do
+ for gdir in "grass70_release" "grass64_release" ; do
cd $gdir
echo "Recompiling $gdir..." 1>&2
svn up
@@ -74,6 +73,9 @@
cp ${m}docs/html/* $dst
fi
done
+
+ cd $DIR/grass-addons/tools/addons
+ ./build-index.sh $MANDIR ${major} ${minor}
}
export GRASS_SKIP_MAPSET_OWNER_CHECK="1"
More information about the grass-commit
mailing list