5 sed -e 's/id="current"/class="current"/' \
6 | tidy -ascii -q --wrap 0 --show-warnings no --fix-uri no \
7 | sed -e 's/name="\([^"]*\)"\([^>]*\) id="\1"/name="\1"\2/g' \
8 | xsltproc --novalid --nonet --html --stringparam topdir $TOPDIR "$base/html-munge.xsl" -
11 ###########################################################################
13 name="`basename "$0"`"; #`"
14 base="`dirname "$0"`"; base="`cd "$base"; pwd`" #`"
16 TEMP=`getopt -n $name -o '' -l html,tagfile,tagfile-name:,tagfiles:,output-dir:,html-dir: -- "$@"`
17 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
20 tagxsl="$base/tag-munge.xsl"
22 html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_dir="html"
29 tagfile="YES" ; shift ;;
31 tagfile_name="$2"; shift 2 ;;
34 f="`readlink -mn "$f"`" #`"
35 tagfiles="$tagfiles${tagfiles:+ }$f"
40 output_dir="$2"; shift 2 ;;
42 html_dir="$2"; shift 2 ;;
46 echo "Internal error: $*"; exit 1 ;;
56 [--tagfile-name=<name>]
65 if [ "$tagfile" == "YES" -a -z "$tagfile_name" ]; then
66 echo "--tagfile-name is required with --tagfile"
72 if [ -f "$doxydir" ]; then
73 doxydir="`dirname "$doxydir"`" #`"
76 doxydir="`readlink -mn "$doxydir"`" #`"
78 ###########################################################################
80 # Create relative path from absolute directory $1 to absolute path $2
88 if [ "$srcd" = "$dstd" ]; then
95 echo "`echo "$src" | sed -e "s/[^\/]*/../g"`/$dst" # `"
98 # Log executed commands
108 do_html_cleanup <"${1}.orig" >"$1"
111 ###########################################################################
116 while [ ! -r "SConstruct" -a "`pwd`" != "/" ]; do cd ..; done
117 if [ ! -r "SConstruct" ]; then
118 echo "topdir not found"
125 ## Remove tagfile_name from list of tagfiles
127 if [ -n "$tagfile_name" ]; then
128 tagfile_name="`readlink -mn "$output_dir/$tagfile_name"`" #`"
129 x="$tagfiles"; tagfiles=""
131 if [ "$f" != "$tagfile_name" ]; then
132 tagfiles="$tagfiles${tagfiles:+ }$f"
137 ## Call doxygen proper
140 if [ "$tagfile" == "YES" ]; then
141 generate_tagfile="$tagfile_name"
143 export TOPDIR html tagfile tagfile_name tagfiles output_dir html_dir generate_tagfile
145 cmd ${DOXYGEN:-doxygen}
148 ## Clean up tagfile, if generated
150 if [ "$tagfile" == "YES" ]; then
151 mv "$tagfile_name" "${tagfile_name}.orig"
152 cmd xsltproc --novalid --nonet -o "$tagfile_name" "$tagxsl" "${tagfile_name}.orig"
158 if [ -n "$tagfiles" ]; then
160 for f in $tagfiles; do
161 n="`basename "$f"`" #`"
162 d="`dirname "$f"`" #`"
163 url="`relpath "$doxydir/$output_dir/$html_dir" "$d/$html_dir"`" #`"
164 args="$args${args:+ }-l $n@$url"
168 cd "./$output_dir/$html_dir"
169 cmd "./installdox" $args
174 ## Postprocess html files, if generated
176 if [ "$html" == "YES" ]; then
177 for h in "$doxydir/$output_dir/$html_dir"/*.html; do
178 cmd html_cleanup "$h"