[GRASS-SVN] r49112 - in grass/branches/develbranch_6: include/Make lib/init scripts/g.extension

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 5 13:14:28 EDT 2011


Author: martinl
Date: 2011-11-05 10:14:28 -0700 (Sat, 05 Nov 2011)
New Revision: 49112

Modified:
   grass/branches/develbranch_6/include/Make/Man.make
   grass/branches/develbranch_6/lib/init/init.sh
   grass/branches/develbranch_6/scripts/g.extension/g.extension
Log:
define default GRASS_ADDON_PATH (~/.grass6/addons)
update g.extension to create standard addons directory layout


Modified: grass/branches/develbranch_6/include/Make/Man.make
===================================================================
--- grass/branches/develbranch_6/include/Make/Man.make	2011-11-05 14:56:05 UTC (rev 49111)
+++ grass/branches/develbranch_6/include/Make/Man.make	2011-11-05 17:14:28 UTC (rev 49112)
@@ -2,7 +2,7 @@
 SECT = 1
 MANDIR  = $(ARCH_DISTDIR)/man/man$(SECT)
 HTMLDIR = $(ARCH_DISTDIR)/docs/html
-HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh $(MODULE_TOPDIR)/tools/g.html2man/g.html2man
+HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh $(MODULE_TOPDIR)/tools/g.html2man
 
 # generic man rules for all commands
 

Modified: grass/branches/develbranch_6/lib/init/init.sh
===================================================================
--- grass/branches/develbranch_6/lib/init/init.sh	2011-11-05 14:56:05 UTC (rev 49111)
+++ grass/branches/develbranch_6/lib/init/init.sh	2011-11-05 17:14:28 UTC (rev 49112)
@@ -256,11 +256,12 @@
 	LCL=`echo "$LANG" | sed 's/\(..\)\(.*\)/\1/'`
 fi
 
-if [ -n "$GRASS_ADDON_PATH" ] ; then
-   PATH="$GISBASE/bin:$GISBASE/scripts:$GRASS_ADDON_PATH:$PATH"
-else
-   PATH="$GISBASE/bin:$GISBASE/scripts:$PATH"
+if [ -z "$GRASS_ADDON_PATH" ] ; then
+    GRASS_ADDON_PATH="$HOME/.grass6/addons/bin:$HOME/.grass6/addons/scripts"
+    export GRASS_ADDON_PATH
+    echo "GRASS_ADDON_PATH undefined, using '$GRASS_ADDON_PATH'"
 fi
+PATH="$GISBASE/bin:$GISBASE/scripts:$GRASS_ADDON_PATH:$PATH"
 export PATH
 
 # Set LD_LIBRARY_PATH to find GRASS shared libraries

Modified: grass/branches/develbranch_6/scripts/g.extension/g.extension
===================================================================
--- grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-05 14:56:05 UTC (rev 49111)
+++ grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-05 17:14:28 UTC (rev 49112)
@@ -234,8 +234,14 @@
 if [ -d "$PREFIX" ] ; then
     MYINST_DIR="$PREFIX"
 else
-    g.message -e "'$PREFIX' does not exist"
-    exit 1
+    if [ "$PREFIX" = "$HOME/.grass6/addons/bin" ] ; then
+	APREFIX=~/.grass6/addons
+	mkdir -p $APREFIX/bin $APREFIX/docs $APREFIX/docs/html \
+	    $APREFIX/etc $APREFIX/man $APREFIX/man/man1 $APREFIX/scripts
+    else
+	g.message -e "'$PREFIX' does not exist"
+	exit 1 
+    fi
 fi
 
 if [ ! -w "$PREFIX" -a $SYSADMIN -ne 1 ] ; then



More information about the grass-commit mailing list