To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / soundsoftware / extract-doxygen.sh @ 738:882917cbe8d0
History | View | Annotate | Download (974 Bytes)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
docdir="/var/doc" |
| 4 |
|
| 5 |
progdir=$(dirname $0) |
| 6 |
case "$progdir" in |
| 7 |
/*) ;; |
| 8 |
*) progdir="$(pwd)/$progdir" ;; |
| 9 |
esac |
| 10 |
|
| 11 |
project="$1" |
| 12 |
projectdir="$2" |
| 13 |
targetdir="$3" |
| 14 |
|
| 15 |
if [ -z "$project" ] || [ -z "$targetdir" ] || [ -z "$projectdir" ]; then |
| 16 |
echo "Usage: $0 <project> <projectdir> <targetdir>" |
| 17 |
exit 2 |
| 18 |
fi |
| 19 |
|
| 20 |
if [ ! -d "$projectdir" ]; then |
| 21 |
echo "Project directory $projectdir not found" |
| 22 |
exit 1 |
| 23 |
fi |
| 24 |
|
| 25 |
if [ ! -d "$targetdir" ]; then |
| 26 |
echo "Target dir $targetdir not found" |
| 27 |
exit 1 |
| 28 |
fi |
| 29 |
|
| 30 |
if [ -f "$targetdir/index.html" ]; then |
| 31 |
echo "Target dir $targetdir already contains index.html" |
| 32 |
exit 1 |
| 33 |
fi |
| 34 |
|
| 35 |
doxyfile=$(find "$projectdir" -type f -name Doxyfile -print | head -1) |
| 36 |
|
| 37 |
if [ -z "$doxyfile" ]; then |
| 38 |
echo "No Doxyfile found for project $project" |
| 39 |
exit 1 |
| 40 |
fi |
| 41 |
|
| 42 |
echo "Project $project contains a Doxyfile at $doxyfile" |
| 43 |
|
| 44 |
cd "$projectdir" || exit 1 |
| 45 |
|
| 46 |
"$progdir/doxysafe.pl" "$doxyfile" | \ |
| 47 |
sed -e '$a OUTPUT_DIRECTORY='"$targetdir" | \ |
| 48 |
doxygen - |
| 49 |
|