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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 14 10:17:54 EST 2011


Author: martinl
Date: 2011-11-14 07:17:54 -0800 (Mon, 14 Nov 2011)
New Revision: 49242

Modified:
   grass-addons/tools/addons/compile.sh
Log:
addons: update compile.sh to be more flexible


Modified: grass-addons/tools/addons/compile.sh
===================================================================
--- grass-addons/tools/addons/compile.sh	2011-11-14 15:01:12 UTC (rev 49241)
+++ grass-addons/tools/addons/compile.sh	2011-11-14 15:17:54 UTC (rev 49242)
@@ -1,19 +1,19 @@
 #!/bin/sh
 
 if [ -z "$3" ]; then
-    echo "usage: $0 path topdir version"
-    echo "eg. $0 ~/src/grass-addons/grass7/ ~/src/grass_trunk/dist.i686-pc-linux-gnu/ 7"
+    echo "usage: $0 svn_path topdir addons_path"
+    echo "eg. $0 ~/src/grass-addons/grass7/ ~/src/grass_trunk/dist.i686-pc-linux-gnu/ ~/.grass7/addons"
     exit 1
 fi
 
-path="$1"
-topdir="$2"
-version="$3"
+SVN_PATH="$1"
+TOPDIR="$2"
+ADDON_PATH="$3"
 
-rm -r ~/.grass$version/addons
-mkdir ~/.grass$version/addons
+rm -r $ADDON_PATH
+mkdir $ADDON_PATH
 
-cd $path
+cd $SVN_PATH
 for c in "display" "general" "imagery" "raster" "vector"; do
     if [ ! -d $c ]; then
 	continue
@@ -22,12 +22,12 @@
     for m in `ls -d */ 2>/dev/null` ; do
 	echo "Compiling $m..."
 	cd $m
-	make MODULE_TOPDIR=$topdir \
-            BIN=~/.grass$version/addons/bin \
-            HTMLDIR=~/.grass$version/addons/docs/html \
-            MANDIR=~/.grass$version/addons/man/man1 \
-            SCRIPTDIR=~/.grass$version/addons/scripts \
-            ETC=~/.grass$version/addons/etc
+	make MODULE_TOPDIR=$TOPDIR \
+            BIN=$ADDON_PATH/bin \
+            HTMLDIR=$ADDON_PATH/docs/html \
+            MANDIR=$ADDON_PATH/man/man1 \
+            SCRIPTDIR=$ADDON_PATH/scripts \
+            ETC=$ADDON_PATH/etc
 	cd ..
     done
     cd ..



More information about the grass-commit mailing list