[Lemon-commits] alpar: r3512 - lemon/trunk/scripts/server-services/repodoc

Lemon SVN svn at lemon.cs.elte.hu
Thu Oct 23 18:49:07 CEST 2008


Author: alpar
Date: Thu Oct 23 18:49:06 2008
New Revision: 3512

Modified:
   lemon/trunk/scripts/server-services/repodoc/make-doc

Log:
Adapt the doc generation to the hg repo

Modified: lemon/trunk/scripts/server-services/repodoc/make-doc
==============================================================================
--- lemon/trunk/scripts/server-services/repodoc/make-doc	(original)
+++ lemon/trunk/scripts/server-services/repodoc/make-doc	Thu Oct 23 18:49:06 2008
@@ -2,49 +2,44 @@
 
 (
     export PATH=/usr/local/bin:$PATH
-    REPOSITORY=https://lemon.cs.elte.hu/svn/lemon/trunk
-    WORKINGCOPY=trunk
+    REPOSITORY=http://lemon.cs.elte.hu/hg/lemon/
+    WORKINGCOPY=lemon
 
     ROOT=$PWD
     LASTREV_FILE=$ROOT/last-rev
     LASTREV=`cat $LASTREV_FILE`
-    
-    svn up $WORKINGCOPY
-    
-    REV=`svn info $WORKINGCOPY|grep 'Revision:'|cut -f 2 -d ' '`
-    LOGFILE=${ROOT}/logs/${REV}.log
-    
-    function make-dir () {
-	if [ ! -d $1 ]; then
-	    mkdir $1
-	fi
-    }
-    
-    
+
+    cd $WORKINGCOPY
+    hg pull
+    hg update
+
+    REV=`hg id -n`
+
     if [ $# -eq 0 ]; then
-#     echo $LASTREV $REV
-	    if [ $LASTREV -lt $REV ]; then
-		cd $WORKINGCOPY
-		autoreconf -vi
-		./configure
-		make doc
-		cd ..
-		rm -rf latest-doc
-		cp -r $WORKINGCOPY/doc/html latest-doc
-		echo $REV >$LASTREV_FILE
-	    fi
-	    
+        if [ $LASTREV -lt $REV ]; then
+            # Delete autom4te.cache in order to get configure regenerated 
+            # and the new revision number propagated into it.
+            rm -rf autom4te.cache
+            rm -rf doc/html
+            autoreconf -vi
+            ./configure
+            make html
+            cd ..
+            rm -rf latest-doc
+            cp -r $WORKINGCOPY/doc/html latest-doc
+            echo $REV >$LASTREV_FILE
+        fi
+
     elif [ $1 = '--help' ]; then
-	echo 'Usage:'
-	echo '   doxymake --init'
-	echo '   doxymake --help'
-	echo '   doxymake'
-	exit 1
+        echo 'Usage:'
+        echo '   make-doc --init'
+        echo '   make-doc --help'
+        echo '   make-doc'
+        exit 1
     elif [ $1 = '--init' ]; then
-	make-dir logs
-	rm -rf $WORKINGCOPY
-	svn co $REPOSITORY $WORKINGCOPY
-	echo '0' >$LASTREV_FILE
-	exit 0
+        rm -rf $WORKINGCOPY
+        hg clone $REPOSITORY $WORKINGCOPY
+        echo '0' >$LASTREV_FILE
+        exit 0
     fi
  ) >/dev/null 2>&1



More information about the Lemon-commits mailing list