scripts/server-services/repodoc/make-doc
author alpar
Mon, 12 Mar 2007 13:45:50 +0000
changeset 2403 b8f65d8528e1
parent 2322 12c5f99807d8
child 2626 324cfbf66a12
permissions -rw-r--r--
The lemon repository has been renamed
alpar@2320
     1
#!/bin/bash
alpar@2320
     2
alpar@2322
     3
(
alpar@2403
     4
    export PATH=/usr/local/bin:$PATH
alpar@2403
     5
    REPOSITORY=https://lemon.cs.elte.hu/svn/lemon/trunk
alpar@2322
     6
    WORKINGCOPY=trunk
alpar@2320
     7
alpar@2322
     8
    ROOT=$PWD
alpar@2322
     9
    LASTREV_FILE=$ROOT/last-rev
alpar@2322
    10
    LASTREV=`cat $LASTREV_FILE`
alpar@2322
    11
    
alpar@2322
    12
    svn up $WORKINGCOPY
alpar@2322
    13
    
alpar@2322
    14
    REV=`svn info $WORKINGCOPY|grep 'Revision:'|cut -f 2 -d ' '`
alpar@2322
    15
    LOGFILE=${ROOT}/logs/${REV}.log
alpar@2322
    16
    
alpar@2322
    17
    function make-dir () {
alpar@2322
    18
	if [ ! -d $1 ]; then
alpar@2322
    19
	    mkdir $1
alpar@2322
    20
	fi
alpar@2322
    21
    }
alpar@2322
    22
    
alpar@2322
    23
    
alpar@2322
    24
    if [ $# -eq 0 ]; then
alpar@2322
    25
#     echo $LASTREV $REV
alpar@2322
    26
	    if [ $LASTREV -lt $REV ]; then
alpar@2322
    27
		cd $WORKINGCOPY
alpar@2322
    28
		autoreconf -vi
alpar@2322
    29
		./configure
alpar@2322
    30
		make doc
alpar@2322
    31
		cd ..
alpar@2322
    32
		rm -rf latest-doc
alpar@2322
    33
		cp -r $WORKINGCOPY/doc/html latest-doc
alpar@2322
    34
		echo $REV >$LASTREV_FILE
alpar@2322
    35
	    fi
alpar@2322
    36
	    
alpar@2322
    37
    elif [ $1 = '--help' ]; then
alpar@2322
    38
	echo 'Usage:'
alpar@2322
    39
	echo '   doxymake --init'
alpar@2322
    40
	echo '   doxymake --help'
alpar@2322
    41
	echo '   doxymake'
alpar@2322
    42
	exit 1
alpar@2322
    43
    elif [ $1 = '--init' ]; then
alpar@2322
    44
	make-dir logs
alpar@2322
    45
	rm -rf $WORKINGCOPY
alpar@2322
    46
	svn co $REPOSITORY $WORKINGCOPY
alpar@2322
    47
	echo '0' >$LASTREV_FILE
alpar@2322
    48
	exit 0
alpar@2320
    49
    fi
alpar@2322
    50
 ) >/dev/null 2>&1