forked from MailCore/MailCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoxygen.sh
executable file
·38 lines (30 loc) · 1.01 KB
/
doxygen.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
#!/bin/sh
destination=Documentation
doxygen=/Applications/Doxygen.app/Contents/Resources/doxygen
resources=Resources
config=$resources/doxygen.conf
output=Documentation
scripts=Scripts/DocScripts
if [ -e "$doxygen" ]; then
# run doxygen, it will know where to place the files
# save stderr output to a file
$doxygen $config &> /dev/null
python $scripts/PlaceIntroContent.py
# purge & create destination directory
rm -rf $destination/API
mkdir -p $destination/API
# transform the source files
for file in `ls $output/html | grep .html`;
do
xsltproc --html $resources/transform.xsl $output/html/$file > $destination/API/$file;
done
xsltproc $resources/transform.xsl $resources/menu.xml > $destination/API/classes.html
# copy all images and stylesheets
cp $output/html/*.png $output/html/*.css $destination/API
cp $resources/*.css $destination/API
mv $output/API .
rm -rf $output
mv API Documentation
else
echo "#WARNING: /Applications/Doxygen.app could not be found. Documentation will not be generated."
fi