[GRASS-SVN] r49123 - grass/branches/develbranch_6/scripts/g.extension

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 6 16:22:05 EST 2011


Author: hamish
Date: 2011-11-06 13:22:05 -0800 (Sun, 06 Nov 2011)
New Revision: 49123

Modified:
   grass/branches/develbranch_6/scripts/g.extension/g.extension
Log:
'make' automatically creates ancillary directories as needed, just need
to create the base dir. bin/ and scripts/ will probably go away in future
gr6 g.extension installs, & please don't propagate GRASS_ADDON_PATH misuse.


Modified: grass/branches/develbranch_6/scripts/g.extension/g.extension
===================================================================
--- grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-06 21:02:08 UTC (rev 49122)
+++ grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-06 21:22:05 UTC (rev 49123)
@@ -234,13 +234,11 @@
 if [ -d "$PREFIX" ] ; then
     MYINST_DIR="$PREFIX"
 else
-    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 
+    g.message -w "'$PREFIX' does not exist. Creating ..."
+    mkdir "$PREFIX"
+    if [ $? -ne 0 ] || [ ! -d "$PREFIX" ] ; then
+	g.message -e "Unable to create '$PREFIX' directory"
+	exit 1
     fi
 fi
 



More information about the grass-commit mailing list