Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | #!/usr/bin/env bash -v |
2 | ||
3 | # Where are we called from? | |
4 | P=`dirname $0` | |
5 | ||
6 | # Current dir | |
7 | ORIGPWD=`pwd` | |
8 | ||
31037a42 | 9 | # Function to Create Folder where documentation will be generated. |
6a488035 TO |
10 | create_doc_folder() |
11 | { | |
12 | cd $ORIGPWD/../ | |
31037a42 EM |
13 | |
14 | if [ ! -d "Documentation" ] ; then | |
6a488035 TO |
15 | mkdir Documentation |
16 | fi | |
17 | } | |
18 | ||
19 | create_documentation() | |
20 | { | |
21 | # | |
22 | # folder to be parsed | |
23 | # | |
24 | PARSE_FOLDER=$ORIGPWD/../ | |
31037a42 | 25 | |
6a488035 TO |
26 | # |
27 | # target folder (documents will be generated in this folder) | |
28 | # | |
29 | TARGET_FOLDER=$ORIGPWD/../Documentation | |
31037a42 | 30 | |
6a488035 TO |
31 | # |
32 | # title of generated documentation | |
31037a42 | 33 | # |
6a488035 | 34 | TITLE="CiviCRM" |
31037a42 | 35 | |
6a488035 TO |
36 | # |
37 | # parse @internal and elements marked private with @access | |
38 | # | |
39 | PRIVATE=on | |
31037a42 | 40 | |
6a488035 TO |
41 | # |
42 | # JavaDoc-compliant description parsing | |
43 | # | |
44 | JAVADOC_STYLE=off | |
31037a42 | 45 | |
6a488035 TO |
46 | # |
47 | # parse a PEAR-style repository | |
48 | # | |
49 | PEAR_STYLE=on | |
31037a42 | 50 | |
6a488035 TO |
51 | # |
52 | # generate highlighted sourcecode for every parced file | |
53 | # | |
54 | SOURCECODE=on | |
31037a42 | 55 | |
6a488035 TO |
56 | # |
57 | # output information (output:converter:templatedir) | |
58 | # | |
59 | OUTPUT=HTML:frames:phpedit | |
31037a42 | 60 | |
6a488035 TO |
61 | phpdoc -t $TARGET_FOLDER -o $OUTPUT -d $PARSE_FOLDER -ti "$TITLE" -pp $PRIVATE -j $JAVADOC_STYLE -p $PEAR_STYLE -s $SOURCECODE |
62 | } | |
63 | ||
64 | # Main Execution Starts Here. | |
65 | ||
66 | create_doc_folder | |
67 | ||
68 | create_documentation |