forked from chatopera/clause
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Doxyfile.sh
executable file
·43 lines (36 loc) · 880 Bytes
/
Doxyfile.sh
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
43
#! /bin/bash
###########################################
#
###########################################
# constants
baseDir=$(cd `dirname "$0"`;pwd)
TARGET=$baseDir/docs
TMPDIR=$baseDir/tmp
# functions
# main
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
if [ ! -d $TMPDIR ]; then
mkdir $TMPDIR
fi
if [ ! -d $baseDir/docs ]; then
mkdir $baseDir/docs
else
rm -rf $baseDir/docs/*
fi
if [ -d $baseDir/tmp/doxygen_out ]; then
rm -rf $baseDir/tmp/doxygen_out
fi
cd $baseDir
echo "Generating docs ..."
set -x
doxygen
if [ -d $baseDir/tmp/doxygen_out/html ]; then
cd $baseDir/tmp/doxygen_out/html
tar cf - .|(cd $TARGET; tar xf -)
cp $baseDir/var/assets/doxygen.index.html $baseDir/docs/index.html
cp -rf $baseDir/var/assets/js $baseDir/docs
echo "built docs in" $TARGET
else
echo "Docs not generated ."
exit 1
fi