| 1 |
#!/bin/bash -e |
| 2 |
# |
| 3 |
# Build all of the TriBITS-related documentation |
| 4 |
# |
| 5 |
# To build this documentation, from any directory, run: |
| 6 |
# |
| 7 |
# <base-dir>/build_docs.sh |
| 8 |
# |
| 9 |
# To only produce all of the input *.rst files but skip the final generation |
| 10 |
# of the HTML and other output files, run: |
| 11 |
# |
| 12 |
# <base-dir>/build_docs.sh --skip-final-generation |
| 13 |
# |
| 14 |
|
| 15 |
# |
| 16 |
# A) Parse command-line arguments |
| 17 |
# |
| 18 |
|
| 19 |
skip_final_generation=0 |
| 20 |
skip_final_generation_arg= |
| 21 |
|
| 22 |
while (( "$#" )); do |
| 23 |
case "$1" in |
| 24 |
--skip-final-generation) |
| 25 |
skip_final_generation=1 |
| 26 |
skip_final_generation_arg=--skip-final-generation |
| 27 |
shift |
| 28 |
;; |
| 29 |
*) |
| 30 |
echo "Error: The argument '$1' is not supported!" |
| 31 |
exit 1 |
| 32 |
;; |
| 33 |
esac |
| 34 |
done |
| 35 |
|
| 36 |
# |
| 37 |
# B) CD into the tribits/doc directory |
| 38 |
# |
| 39 |
|
| 40 |
if [ "$TRIBITS_BASE_DIR" == "" ] ; then |
| 41 |
_ABS_FILE_PATH=`readlink -f $0` |
| 42 |
_BASE_DIR=`dirname $_ABS_FILE_PATH` |
| 43 |
fi |
| 44 |
|
| 45 |
cd $_BASE_DIR |
| 46 |
|
| 47 |
# |
| 48 |
# C) Generate the documentation |
| 49 |
# |
| 50 |
|
| 51 |
echo |
| 52 |
echo "***" |
| 53 |
echo "*** Generating Users and Maintainers guides ..." |
| 54 |
echo "***" |
| 55 |
echo |
| 56 |
|
| 57 |
cd $_BASE_DIR/guides/ |
| 58 |
./generate-guide.sh all ${skip_final_generation_arg} |
| 59 |
cd - |
| 60 |
if [[ "${skip_final_generation}" == "0" ]] ; then |
| 61 |
echo |
| 62 |
echo "See generated files:" |
| 63 |
echo |
| 64 |
ls $_BASE_DIR/guides/users_guide/TribitsUsersGuide.* |
| 65 |
ls $_BASE_DIR/guides/maintainers_guide/TribitsMaintainersGuide.* |
| 66 |
fi |
| 67 |
|
| 68 |
echo |
| 69 |
echo "***" |
| 70 |
echo "*** Generating TribitsBuildReference.[rst,html,pdf] ..." |
| 71 |
echo "***" |
| 72 |
echo |
| 73 |
|
| 74 |
cd $_BASE_DIR/build_ref |
| 75 |
./create-build-ref.sh ${skip_final_generation_arg} |
| 76 |
if [[ "${skip_final_generation}" == "0" ]] ; then |
| 77 |
echo |
| 78 |
echo "See generated files:" |
| 79 |
echo |
| 80 |
ls $_BASE_DIR/build_ref/TribitsBuildReference.* |
| 81 |
fi |
| 82 |
|
| 83 |
#echo |
| 84 |
#echo "***" |
| 85 |
#echo "*** Generating TribitsOverview.pdf ..." |
| 86 |
#echo "***" |
| 87 |
#echo |
| 88 |
# |
| 89 |
#cd $_BASE_DIR/overview |
| 90 |
#source source_set_env |
| 91 |
#make |
| 92 |
#echo |
| 93 |
#echo "See generated files:" |
| 94 |
#echo |
| 95 |
#ls $_BASE_DIR/overview/TribitsOverview.pdf |
| 96 |
# |
| 97 |
#echo |
| 98 |
#echo "***" |
| 99 |
#echo "*** Generating TribitsLifecycleModel.pdf ..." |
| 100 |
#echo "***" |
| 101 |
#echo |
| 102 |
# |
| 103 |
#cd $_BASE_DIR/lifecycle_model |
| 104 |
#make |
| 105 |
#echo |
| 106 |
#echo "See generated files:" |
| 107 |
#echo |
| 108 |
#ls $_BASE_DIR/lifecycle_model/TribitsLifecycleModel.pdf |