scripts/server-services/repodoc/make-doc
changeset 2344 48ecc4feb42b
parent 2320 4e8ecce96b12
child 2403 b8f65d8528e1
equal deleted inserted replaced
0:f5166f3d079b 1:cd5ca9ead074
     1 #!/bin/bash
     1 #!/bin/bash
     2 
     2 
     3 REPOSITORY=https://lemon.cs.elte.hu/svn/hugo/trunk
     3 (
     4 WORKINGCOPY=trunk
     4     REPOSITORY=https://lemon.cs.elte.hu/svn/hugo/trunk
       
     5     WORKINGCOPY=trunk
     5 
     6 
     6 ROOT=$PWD
     7     ROOT=$PWD
     7 LASTREV_FILE=$ROOT/last-rev
     8     LASTREV_FILE=$ROOT/last-rev
     8 LASTREV=`cat $LASTREV_FILE`
     9     LASTREV=`cat $LASTREV_FILE`
     9 
    10     
    10 svn up $WORKINGCOPY
    11     svn up $WORKINGCOPY
    11 
    12     
    12 REV=`svn info $WORKINGCOPY|grep 'Revision:'|cut -f 2 -d ' '`
    13     REV=`svn info $WORKINGCOPY|grep 'Revision:'|cut -f 2 -d ' '`
    13 LOGFILE=${ROOT}/logs/${REV}.log
    14     LOGFILE=${ROOT}/logs/${REV}.log
    14 
    15     
    15 function make-dir () {
    16     function make-dir () {
    16     if [ ! -d $1 ]; then
    17 	if [ ! -d $1 ]; then
    17 	mkdir $1
    18 	    mkdir $1
       
    19 	fi
       
    20     }
       
    21     
       
    22     
       
    23     if [ $# -eq 0 ]; then
       
    24 #     echo $LASTREV $REV
       
    25 	    if [ $LASTREV -lt $REV ]; then
       
    26 		cd $WORKINGCOPY
       
    27 		autoreconf -vi
       
    28 		./configure
       
    29 		make doc
       
    30 		cd ..
       
    31 		rm -rf latest-doc
       
    32 		cp -r $WORKINGCOPY/doc/html latest-doc
       
    33 		echo $REV >$LASTREV_FILE
       
    34 	    fi
       
    35 	    
       
    36     elif [ $1 = '--help' ]; then
       
    37 	echo 'Usage:'
       
    38 	echo '   doxymake --init'
       
    39 	echo '   doxymake --help'
       
    40 	echo '   doxymake'
       
    41 	exit 1
       
    42     elif [ $1 = '--init' ]; then
       
    43 	make-dir logs
       
    44 	rm -rf $WORKINGCOPY
       
    45 	svn co $REPOSITORY $WORKINGCOPY
       
    46 	echo '0' >$LASTREV_FILE
       
    47 	exit 0
    18     fi
    48     fi
    19 }
    49  ) >/dev/null 2>&1
    20 
       
    21 
       
    22 if [ $# -eq 0 ]; then
       
    23     echo $LASTREV $REV
       
    24     if [ $LASTREV -lt $REV ]; then
       
    25 	cd $WORKINGCOPY
       
    26 	autoreconf -vi
       
    27 	./configure
       
    28 	make doc
       
    29 	cd ..
       
    30 	rm -rf latest-doc
       
    31 	cp -r $WORKINGCOPY/doc/html latest-doc
       
    32 	echo $REV >$LASTREV_FILE
       
    33     fi
       
    34 
       
    35 elif [ $1 = '--help' ]; then
       
    36     echo 'Usage:'
       
    37     echo '   doxymake --init'
       
    38     echo '   doxymake --help'
       
    39     echo '   doxymake'
       
    40     exit 1
       
    41 elif [ $1 = '--init' ]; then
       
    42     make-dir logs
       
    43     rm -rf $WORKINGCOPY
       
    44     svn co $REPOSITORY $WORKINGCOPY
       
    45     echo '0' >$LASTREV_FILE
       
    46     exit 0
       
    47 fi
       
    48