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