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 @ 1577:e38eee2e1d47
History | View | Annotate | Download (974 Bytes)
| 1 | 203:1e55195bca45 | chris | #!/bin/bash |
|---|---|---|---|
| 2 | |||
| 3 | docdir="/var/doc" |
||
| 4 | |||
| 5 | 228:3c084a25d8ab | chris | progdir=$(dirname $0) |
| 6 | case "$progdir" in |
||
| 7 | /*) ;; |
||
| 8 | *) progdir="$(pwd)/$progdir" ;; |
||
| 9 | esac |
||
| 10 | |||
| 11 | 203:1e55195bca45 | chris | project="$1" |
| 12 | 223:c3544e9fd588 | chris | projectdir="$2" |
| 13 | targetdir="$3" |
||
| 14 | 203:1e55195bca45 | chris | |
| 15 | 223:c3544e9fd588 | chris | if [ -z "$project" ] || [ -z "$targetdir" ] || [ -z "$projectdir" ]; then |
| 16 | echo "Usage: $0 <project> <projectdir> <targetdir>" |
||
| 17 | 203:1e55195bca45 | chris | exit 2 |
| 18 | fi |
||
| 19 | |||
| 20 | 223:c3544e9fd588 | chris | if [ ! -d "$projectdir" ]; then |
| 21 | echo "Project directory $projectdir not found" |
||
| 22 | 203:1e55195bca45 | chris | 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 | 228:3c084a25d8ab | chris | "$progdir/doxysafe.pl" "$doxyfile" | \ |
| 47 | sed -e '$a OUTPUT_DIRECTORY='"$targetdir" | \ |
||
| 48 | 203:1e55195bca45 | chris | doxygen - |