Debian Codegraph @

docs/manual/make_all_docs

raw
1 #!/bin/ksh
2
3 # Builds all the books for the Magics documentation.
4 # Calls make_docs for each book, passing parameters as appropriate
5
6
7 format=""
8 format_flag=""
9 targetopt=""
10 cleanopt=""
11
12
13 for arg;do
14 if [[ $arg = "-h" || $arg = "-help" || $arg = "--help" ]]
15 then
16 echo ""
17 echo "make_docs"
18 echo "Possible options:"
19 echo " -html : resultant output in HTML"
20 echo " -pdf : resultant output in PDF"
21 echo " -targets : generate link targets"
22 echo " -noclean : do not remove temporary files"
23 echo ""
24 exit
25 fi
26
27 if [[ $arg = "-html" ]]
28 then
29 format="html"
30 fi
31
32 if [[ $arg = "-pdf" ]]
33 then
34 format="pdf"
35 fi
36
37
38 if [[ $arg = "-targets" ]]
39 then
40 targetopt="-targets"
41 fi
42
43 if [[ $arg = "-noclean" ]]
44 then
45 cleanopt="-noclean"
46 fi
47
48 done
49
50
51 if [[ $arg = "" ]]
52 then
53 echo "No output format set - use 'make_docs -h' for help"
54 exit
55 fi
56
57
58
59 if [[ $format = "pdf" ]]
60 then
61 for book in axis boxplot contour data drivers intro install layout_mapping_coastlines legend graph polyline symbol text using wind params_fortran #tutorial
62 do
63 echo "Building chapter $book"
64 ./make_docs -$format -book=magics_$book $targetopt $cleanopt
65 done
66 else
67 ./make_docs -$format -book=magics_userguide $targetopt $cleanopt # we do the html all-at-once
68 fi