File: generatedocs.sh

package info (click to toggle)
pacparser 1.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,060 kB
  • sloc: ansic: 78,141; makefile: 436; perl: 395; python: 299; sh: 149; asm: 46; javascript: 38
file content (42 lines) | stat: -rwxr-xr-x 1,012 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

tools_dir=$(dirname $0)
if [ "${tools_dir:0:1}" != "/" ]; then
  tools_dir=$PWD/$tools_dir
fi

docs_dir=$tools_dir/../docs
src_dir=$tools_dir/../src

tmpdir=$TMPDIR/pacparser_doxygen_temp_$$
mkdir -p $tmpdir

cd $tmpdir

cp $src_dir/pacparser.h .
doxygen $docs_dir/doxygen.config
if [ $? != 0 ]; then
  echo "Doxygen returned error. Not continuing."
  exit
fi

mkdir -p $docs_dir/html

# Fix HTMLs.
mv html/group__pacparser.html $docs_dir/html/pacparser.html
mv html/doxygen.css $docs_dir/html/
sed -i '' -e 's/group__pacparser.html//g' $docs_dir/html/pacparser.html
# Remove Doxygen logo.
sed -i '' -e '/doxygen\.png/s/^.*$/Doxygen/g' $docs_dir/html/pacparser.html

mkdir -p $docs_dir/man/man3
mv man/man3/* $docs_dir/man/man3/
# Remove unnecessary and bad file deprecated.3
rm -f $docs_dir/man/man3/deprecated.3
# Fix man page.
sed -i '' -e 's/pacparser \\\-/pacparser - Library to parse proxy auto-confg (PAC) files./g' $docs_dir/man/man3/*.3
cd -

echo $tmpdir
# Cleanup temp dir
rm -rf $tmpdir