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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 28 17:37:14 EST 2011


Author: hamish
Date: 2011-11-28 14:37:14 -0800 (Mon, 28 Nov 2011)
New Revision: 49414

Modified:
   grass/branches/develbranch_6/scripts/g.extension/g.extension
Log:
(deactivated) demonstraion code for moving man pages into docs/ dir

Modified: grass/branches/develbranch_6/scripts/g.extension/g.extension
===================================================================
--- grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-28 20:18:26 UTC (rev 49413)
+++ grass/branches/develbranch_6/scripts/g.extension/g.extension	2011-11-28 22:37:14 UTC (rev 49414)
@@ -269,7 +269,7 @@
    if test -f "$MYINST_DIR/scripts/$MODULE" ; then
        rm -f "$MYINST_DIR/scripts/$MODULE"
    fi
-   if test -h "$MYINST_DIR/$MODULE" ; then
+   if test -f "$MYINST_DIR/$MODULE" ; then
        rm -f "$MYINST_DIR/$MODULE"
    fi
    if test -f "${MYINST_DIR}/docs/html/${MODULE}.html" ; then
@@ -279,6 +279,9 @@
    if test -f "${MYINST_DIR}/man/man1/${MODULE}.1" ; then
        rm -f "${MYINST_DIR}/man/man1/${MODULE}.1"
    fi
+   if test -f "$MYINST_DIR/docs/man/man1/$MODULE.1" ; then
+       rm -f "$MYINST_DIR/docs/man/man1/$MODULE.1"
+   fi
 
    exit 0
 fi
@@ -413,6 +416,17 @@
          if [ `ls -a "$MYINST_DIR/$PROGTYPE" | wc -l` -le 2 ] ; then
             rmdir "$MYINST_DIR/$PROGTYPE"
          fi
+	 # and move the man page into docs/
+	 if [ -e "$MYINST_DIR/man/man1/$MODULE.1" ] ; then
+	    mkdir -p "$MYINST_DIR/docs/man/man1"
+	    mv "$MYINST_DIR/man/man1/$MODULE.1" "$MYINST_DIR/docs/man/man1/"
+	    if [ `ls -a "$MYINST_DIR/man/man1" | wc -l` -le 2 ] ; then
+	       rmdir "$MYINST_DIR/man/man1"
+               if [ `ls -a "$MYINST_DIR/man" | wc -l` -le 2 ] ; then
+                  rmdir "$MYINST_DIR/man"
+               fi
+	    fi
+	 fi
       fi
    fi
 fi



More information about the grass-commit mailing list