Adapt the doc generation to the hg repo
authoralpar
Thu, 23 Oct 2008 16:49:06 +0000
changeset 2626324cfbf66a12
parent 2625 c51b320bc51c
child 2627 197e2ea11bad
Adapt the doc generation to the hg repo
scripts/server-services/repodoc/make-doc
     1.1 --- a/scripts/server-services/repodoc/make-doc	Wed Oct 15 12:04:11 2008 +0000
     1.2 +++ b/scripts/server-services/repodoc/make-doc	Thu Oct 23 16:49:06 2008 +0000
     1.3 @@ -2,49 +2,44 @@
     1.4  
     1.5  (
     1.6      export PATH=/usr/local/bin:$PATH
     1.7 -    REPOSITORY=https://lemon.cs.elte.hu/svn/lemon/trunk
     1.8 -    WORKINGCOPY=trunk
     1.9 +    REPOSITORY=http://lemon.cs.elte.hu/hg/lemon/
    1.10 +    WORKINGCOPY=lemon
    1.11  
    1.12      ROOT=$PWD
    1.13      LASTREV_FILE=$ROOT/last-rev
    1.14      LASTREV=`cat $LASTREV_FILE`
    1.15 -    
    1.16 -    svn up $WORKINGCOPY
    1.17 -    
    1.18 -    REV=`svn info $WORKINGCOPY|grep 'Revision:'|cut -f 2 -d ' '`
    1.19 -    LOGFILE=${ROOT}/logs/${REV}.log
    1.20 -    
    1.21 -    function make-dir () {
    1.22 -	if [ ! -d $1 ]; then
    1.23 -	    mkdir $1
    1.24 -	fi
    1.25 -    }
    1.26 -    
    1.27 -    
    1.28 +
    1.29 +    cd $WORKINGCOPY
    1.30 +    hg pull
    1.31 +    hg update
    1.32 +
    1.33 +    REV=`hg id -n`
    1.34 +
    1.35      if [ $# -eq 0 ]; then
    1.36 -#     echo $LASTREV $REV
    1.37 -	    if [ $LASTREV -lt $REV ]; then
    1.38 -		cd $WORKINGCOPY
    1.39 -		autoreconf -vi
    1.40 -		./configure
    1.41 -		make doc
    1.42 -		cd ..
    1.43 -		rm -rf latest-doc
    1.44 -		cp -r $WORKINGCOPY/doc/html latest-doc
    1.45 -		echo $REV >$LASTREV_FILE
    1.46 -	    fi
    1.47 -	    
    1.48 +        if [ $LASTREV -lt $REV ]; then
    1.49 +            # Delete autom4te.cache in order to get configure regenerated 
    1.50 +            # and the new revision number propagated into it.
    1.51 +            rm -rf autom4te.cache
    1.52 +            rm -rf doc/html
    1.53 +            autoreconf -vi
    1.54 +            ./configure
    1.55 +            make html
    1.56 +            cd ..
    1.57 +            rm -rf latest-doc
    1.58 +            cp -r $WORKINGCOPY/doc/html latest-doc
    1.59 +            echo $REV >$LASTREV_FILE
    1.60 +        fi
    1.61 +
    1.62      elif [ $1 = '--help' ]; then
    1.63 -	echo 'Usage:'
    1.64 -	echo '   doxymake --init'
    1.65 -	echo '   doxymake --help'
    1.66 -	echo '   doxymake'
    1.67 -	exit 1
    1.68 +        echo 'Usage:'
    1.69 +        echo '   make-doc --init'
    1.70 +        echo '   make-doc --help'
    1.71 +        echo '   make-doc'
    1.72 +        exit 1
    1.73      elif [ $1 = '--init' ]; then
    1.74 -	make-dir logs
    1.75 -	rm -rf $WORKINGCOPY
    1.76 -	svn co $REPOSITORY $WORKINGCOPY
    1.77 -	echo '0' >$LASTREV_FILE
    1.78 -	exit 0
    1.79 +        rm -rf $WORKINGCOPY
    1.80 +        hg clone $REPOSITORY $WORKINGCOPY
    1.81 +        echo '0' >$LASTREV_FILE
    1.82 +        exit 0
    1.83      fi
    1.84   ) >/dev/null 2>&1