[GRASS-SVN] r59945 - grass-addons/tools/addons
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Apr 26 05:29:26 PDT 2014
Author: martinl
Date: 2014-04-26 05:29:26 -0700 (Sat, 26 Apr 2014)
New Revision: 59945
Modified:
grass-addons/tools/addons/compile-xml.sh
grass-addons/tools/addons/grass-addons.sh
Log:
grass-addons scripts: don't use hardcoded destination
Modified: grass-addons/tools/addons/compile-xml.sh
===================================================================
--- grass-addons/tools/addons/compile-xml.sh 2014-04-26 12:28:04 UTC (rev 59944)
+++ grass-addons/tools/addons/compile-xml.sh 2014-04-26 12:29:26 UTC (rev 59945)
@@ -1,6 +1,10 @@
#!/bin/sh
-DEST=/osgeo/grass/grass-web-public/addons
+if test -z "$1" ; then
+ echo "DEST not defined"
+ exit 1
+fi
+DEST="$1"
compile() {
./compile.sh $1 $2 $3 1
Modified: grass-addons/tools/addons/grass-addons.sh
===================================================================
--- grass-addons/tools/addons/grass-addons.sh 2014-04-26 12:28:04 UTC (rev 59944)
+++ grass-addons/tools/addons/grass-addons.sh 2014-04-26 12:29:26 UTC (rev 59945)
@@ -1,8 +1,15 @@
#!/bin/sh
DIR=$HOME/src
-WWWDIR=/osgeo/grass/grass-cms/addons/
+# XMLDIR=/osgeo/grass/grass-cms/addons/
+# MANDIR=/osgeo/grass/grass-cms/
+XMLDIR=/var/www/grass/addons/
+MANDIR=/var/www/grass
+if [ ! -d "$XMLDIR" ]; then
+ mkdir -p $XMLDIR
+fi
+
build_addons() {
cd $DIR/grass-addons/
@@ -15,17 +22,17 @@
###svn up || (svn cleanup && svn up)
cd tools/addons/
- ./compile-xml.sh
+ ./compile-xml.sh $XMLDIR
for version in 6 7 ; do
cd $HOME/.grass${version}/addons/
- cp modules.xml $WWWDIR/grass${version}/
- rsync -ag --delete logs $WWWDIR/grass${version}/
- cd $WWWDIR/grass${version}/logs
+ 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 5
update_manual 6 4
fi
}
@@ -33,17 +40,19 @@
recompile_grass() {
cd $DIR
- for gdir in "grass_trunk" "grass6_devel" "grass64_release" ; do
+ for gdir in "grass_trunk" "grass70_release" "grass64_release" ; do
cd $gdir
+ echo "Recompiling $gdir..." 1>&2
svn up
- make distclean
- if [ $gdir = "grass_trunk" ] ; then
+ make distclean >/dev/null 2>&1
+ if [ $gdir = "grass64_release" ] ; then
+ num=6
+ else
num=7
- else
- num=6
fi
- $DIR/configures.sh grass$num
- make
+ $DIR/configures.sh grass$num >/dev/null 2>&1
+ make >/dev/null 2>&1
+ cat error.log 1>&2
cd ..
done
}
@@ -52,15 +61,18 @@
major=$1
minor=$2
echo "Updating manuals for GRASS ${major}.${minor}..."
- cd $HOME/.grass${major}/addons/
- dst="/osgeo/grass/grass-cms/grass${major}${minor}/manuals/addons/"
+ dst="$MANDIR/grass${major}${minor}/manuals/addons/"
if [ ! -d $dst ] ; then
- mkdir $dst
- cp /osgeo/grass/grass-cms/grass${major}${minor}/manuals/grass_logo.png $dst
- cp /osgeo/grass/grass-cms/grass${major}${minor}/manuals/grassdocs.css $dst
+ mkdir -p $dst
+ cd $dst
+ wget http://grass.osgeo.org/grass${major}${minor}/manuals/grass_logo.png
+ wget http://grass.osgeo.org/grass${major}${minor}/manuals/grassdocs.css
fi
+ cd $HOME/.grass${major}/addons/
for m in $(ls -d */) ; do
- cp ${m}docs/html/* $dst
+ if [ `ls ${m}docs/html/ -w1 2>/dev/null | wc -l` -gt 0 ] ; then
+ cp ${m}docs/html/* $dst
+ fi
done
}
More information about the grass-commit
mailing list