| Line |  | 
|---|
| 1 | #!/bin/bash | 
|---|
| 2 |  | 
|---|
| 3 | ( | 
|---|
| 4 | export PATH=/usr/local/bin:$PATH | 
|---|
| 5 | REPOSITORY=http://lemon.cs.elte.hu/hg/lemon/ | 
|---|
| 6 | WORKINGCOPY=lemon | 
|---|
| 7 |  | 
|---|
| 8 | ROOT=$PWD | 
|---|
| 9 | LASTREV_FILE=$ROOT/last-rev | 
|---|
| 10 | LASTREV=`cat $LASTREV_FILE` | 
|---|
| 11 |  | 
|---|
| 12 | cd $WORKINGCOPY | 
|---|
| 13 | hg pull | 
|---|
| 14 | hg update | 
|---|
| 15 |  | 
|---|
| 16 | REV=`hg id -n` | 
|---|
| 17 |  | 
|---|
| 18 | if [ $# -eq 0 ]; then | 
|---|
| 19 | if [ $LASTREV -lt $REV ]; then | 
|---|
| 20 | # Delete autom4te.cache in order to get configure regenerated | 
|---|
| 21 | # and the new revision number propagated into it. | 
|---|
| 22 | rm -rf autom4te.cache | 
|---|
| 23 | rm -rf doc/html | 
|---|
| 24 | autoreconf -vi | 
|---|
| 25 | ./configure | 
|---|
| 26 | make html | 
|---|
| 27 | cd .. | 
|---|
| 28 | rm -rf latest-doc | 
|---|
| 29 | cp -r $WORKINGCOPY/doc/html latest-doc | 
|---|
| 30 | echo $REV >$LASTREV_FILE | 
|---|
| 31 | fi | 
|---|
| 32 |  | 
|---|
| 33 | elif [ $1 = '--help' ]; then | 
|---|
| 34 | echo 'Usage:' | 
|---|
| 35 | echo '   make-doc --init' | 
|---|
| 36 | echo '   make-doc --help' | 
|---|
| 37 | echo '   make-doc' | 
|---|
| 38 | exit 1 | 
|---|
| 39 | elif [ $1 = '--init' ]; then | 
|---|
| 40 | rm -rf $WORKINGCOPY | 
|---|
| 41 | hg clone $REPOSITORY $WORKINGCOPY | 
|---|
| 42 | echo '0' >$LASTREV_FILE | 
|---|
| 43 | exit 0 | 
|---|
| 44 | fi | 
|---|
| 45 | ) >/dev/null 2>&1 | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.