alpar@2320: #!/bin/bash alpar@2320: alpar@2322: ( alpar@2403: export PATH=/usr/local/bin:$PATH alpar@2626: REPOSITORY=http://lemon.cs.elte.hu/hg/lemon/ alpar@2626: WORKINGCOPY=lemon alpar@2320: alpar@2322: ROOT=$PWD alpar@2322: LASTREV_FILE=$ROOT/last-rev alpar@2322: LASTREV=`cat $LASTREV_FILE` alpar@2626: alpar@2626: cd $WORKINGCOPY alpar@2626: hg pull alpar@2626: hg update alpar@2626: alpar@2626: REV=`hg id -n` alpar@2626: alpar@2322: if [ $# -eq 0 ]; then alpar@2626: if [ $LASTREV -lt $REV ]; then alpar@2626: # Delete autom4te.cache in order to get configure regenerated alpar@2626: # and the new revision number propagated into it. alpar@2626: rm -rf autom4te.cache alpar@2626: rm -rf doc/html alpar@2626: autoreconf -vi alpar@2626: ./configure alpar@2626: make html alpar@2626: cd .. alpar@2626: rm -rf latest-doc alpar@2626: cp -r $WORKINGCOPY/doc/html latest-doc alpar@2626: echo $REV >$LASTREV_FILE alpar@2626: fi alpar@2626: alpar@2322: elif [ $1 = '--help' ]; then alpar@2626: echo 'Usage:' alpar@2626: echo ' make-doc --init' alpar@2626: echo ' make-doc --help' alpar@2626: echo ' make-doc' alpar@2626: exit 1 alpar@2322: elif [ $1 = '--init' ]; then alpar@2626: rm -rf $WORKINGCOPY alpar@2626: hg clone $REPOSITORY $WORKINGCOPY alpar@2626: echo '0' >$LASTREV_FILE alpar@2626: exit 0 alpar@2320: fi alpar@2322: ) >/dev/null 2>&1