forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go-doxygen
executable file
·56 lines (48 loc) · 1.7 KB
/
go-doxygen
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
44
45
46
47
48
49
50
51
52
53
54
55
#! /bin/bash
# Making sure that plumed executable is available
echo -n "Searching for plumed ..."
if plumed --no-mpi 2>/dev/null 1>/dev/null ; then
echo " found"
else
echo " not found"
echo -n "Sourcing sourceme.sh and searching again ..."
if source ../sourceme.sh && plumed --no-mpi 2>/dev/null 1>/dev/null ; then
echo " found"
else
echo "ERROR: you should compile plumed first!"
exit 1
fi
fi
LIST="
IntroPP.txt ../CHANGES InstallationPP.txt SyntaxPP.txt ColvarPP.txt GroupPP.txt FunctionsPP.txt AnalysisPP.txt
BiasPP.txt ToolsPP.txt MiscPP.txt RegexPP.txt FilesPP.txt ModulesPP.txt TutorialsPP.txt GlossaryPP.txt automatic tutorials"
{
cat Doxyfile
echo "PROJECT_NUMBER = \"$(plumed --no-mpi info --long-version)\""
echo "INPUT+=" $LIST
# add this to manually control layout:
# echo "LAYOUT_FILE=PlumedLayout.xml"
} | doxygen -
for file in html/*.html
do
awk -v version=$(plumed --no-mpi info --version) '{
if(match($0,"<span>Main Page</span>")){
sub("Main","Home",$0);
sub("Page","(v"version")",$0);
print
} else if(match($0,"<span>Related Pages</span>")){
print " <li><a href=\"_syntax.html\"><span>Getting started</span></a></li>"
print " <li><a href=\"tutorials.html\"><span>Tutorials</span></a></li>"
print " <li><a href=\"glossary.html\"><span>Index of Actions</span></a></li>"
} else print
}' $file > $file.tmp
mv $file.tmp $file
done
cat html/doxygen.css plumed.css > html/doxygen.css.tmp
mv html/doxygen.css.tmp html/doxygen.css
cd latex
# this is a workaround for a problem on the linux workstation
# where I compile the manual - GB
sed -i 's/pdfencoding=unicode/unicode/g' refman.tex
make
cp refman.pdf ../manual.pdf