Mercurial > hg > soundsoftware-site
annotate extra/soundsoftware/extract-doxygen.sh @ 223:c3544e9fd588 feature_20
* Some work on managing ownerships etc for doc extraction
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 15 Feb 2011 16:58:46 +0000 |
parents | 1e55195bca45 |
children | 3c084a25d8ab |
rev | line source |
---|---|
chris@203 | 1 #!/bin/bash |
chris@203 | 2 |
chris@203 | 3 docdir="/var/doc" |
chris@203 | 4 |
chris@203 | 5 project="$1" |
chris@223 | 6 projectdir="$2" |
chris@223 | 7 targetdir="$3" |
chris@203 | 8 |
chris@223 | 9 if [ -z "$project" ] || [ -z "$targetdir" ] || [ -z "$projectdir" ]; then |
chris@223 | 10 echo "Usage: $0 <project> <projectdir> <targetdir>" |
chris@203 | 11 exit 2 |
chris@203 | 12 fi |
chris@203 | 13 |
chris@223 | 14 if [ ! -d "$projectdir" ]; then |
chris@223 | 15 echo "Project directory $projectdir not found" |
chris@203 | 16 exit 1 |
chris@203 | 17 fi |
chris@203 | 18 |
chris@203 | 19 if [ ! -d "$targetdir" ]; then |
chris@203 | 20 echo "Target dir $targetdir not found" |
chris@203 | 21 exit 1 |
chris@203 | 22 fi |
chris@203 | 23 |
chris@203 | 24 if [ -f "$targetdir/index.html" ]; then |
chris@203 | 25 echo "Target dir $targetdir already contains index.html" |
chris@203 | 26 exit 1 |
chris@203 | 27 fi |
chris@203 | 28 |
chris@203 | 29 doxyfile=$(find "$projectdir" -type f -name Doxyfile -print | head -1) |
chris@203 | 30 |
chris@203 | 31 if [ -z "$doxyfile" ]; then |
chris@203 | 32 echo "No Doxyfile found for project $project" |
chris@203 | 33 exit 1 |
chris@203 | 34 fi |
chris@203 | 35 |
chris@203 | 36 echo "Project $project contains a Doxyfile at $doxyfile" |
chris@203 | 37 |
chris@203 | 38 cd "$projectdir" || exit 1 |
chris@203 | 39 |
chris@203 | 40 # hmm. should be a whitelist |
chris@203 | 41 |
chris@203 | 42 cat "$doxyfile" | \ |
chris@203 | 43 grep -vi OUTPUT_DIRECTORY | \ |
chris@203 | 44 grep -vi HTML_OUTPUT | \ |
chris@203 | 45 grep -vi SEARCHENGINE | \ |
chris@203 | 46 grep -vi HAVE_DOT | \ |
chris@203 | 47 grep -vi DOT_FONTNAME | \ |
chris@203 | 48 grep -vi DOT_FONTPATH | \ |
chris@203 | 49 grep -vi DOT_TRANSPARENT | \ |
chris@203 | 50 sed -e '$a OUTPUT_DIRECTORY='"$targetdir" \ |
chris@203 | 51 -e '$a HTML_OUTPUT = .' \ |
chris@203 | 52 -e '$a SEARCHENGINE = NO' \ |
chris@203 | 53 -e '$a HAVE_DOT = YES' \ |
chris@203 | 54 -e '$a DOT_FONTNAME = FreeMono' \ |
chris@203 | 55 -e '$a DOT_FONTPATH = /usr/share/fonts/truetype/freefont' \ |
chris@203 | 56 -e '$a DOT_TRANSPARENT = YES' | \ |
chris@203 | 57 doxygen - |
chris@203 | 58 |