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