@@ -16,40 +16,43 @@ DOC_DIR=`( cd "$SCRIPT_PATH" && pwd )| sed 's|\(.*\)/.*|\1|'`
1616# Source the playbook*.rst into a single RST so that our topic is a single html
1717# ###############################################################################
1818
19- # If playbooks-single.rst exists, zero it out so we generate the lastest based
20- # on the payboook-*.rst files
21- if [[ -f $DOC_DIR /source/playbooks-single.rst ]]; then
22- :> $DOC_DIR /source/playbooks-single.rst
23- fi
24-
25- # Remove the first toctree entry and onwards from playbooks.rst to create a new
26- # RST playbooks-single.rst. Note, you should ensure toctree entries are at the
27- # end of the conent to not remove unwanted content.
28- if [[ -f $DOC_DIR /source/playbooks.rst ]]; then
29-
30- # Remove the toctree entries
31- awk ' /toctree/ {exit} {print}' $DOC_DIR /source/playbooks.rst >> $DOC_DIR /source/playbooks-single.rst
32-
33- # Concat the interested RSTs into playbooks-single.rst to create a single RST
34- if [[ -f $DOC_DIR /source/playbook_config_setup.rst && -f $DOC_DIR /source/playbook_inventory.rst && -f $DOC_DIR /source/playbook_group_vars.rst && -f $DOC_DIR /source/playbook_run.rst ]]; then
35-
36- # Inform readers this is auto generated thus avoding the need to maintain
37- echo " .. ...........................................................................\n$( < $DOC_DIR /source/playbooks-single.rst) " > $DOC_DIR /source/playbooks-single.rst
38- echo " .. Auto generated restructured text .\n$( < $DOC_DIR /source/playbooks-single.rst) " > $DOC_DIR /source/playbooks-single.rst
39- echo " .. ...........................................................................\n$( < $DOC_DIR /source/playbooks-single.rst) " > $DOC_DIR /source/playbooks-single.rst
40-
41- # For each identified file we want to merge into playbooks-single.rst cat them and merge
42- for file in $DOC_DIR /source/playbook_config_setup.rst $DOC_DIR /source/playbook_inventory.rst $DOC_DIR /source/playbook_group_vars.rst $DOC_DIR /source/playbook_run.rst; do
43- echo " " >> $DOC_DIR /source/playbooks-single.rst;
44- cat " $file " >> $DOC_DIR /source/playbooks-single.rst;
45- done
46- else
47- # When unable to merge remove the auto generated RST so that is apparent
48- # it is not generated and will diff in a 'git status'
49-
50- rm -rf $DOC_DIR /source/playbooks-single.rst
51- fi
52- fi
19+ # ###############################################################################
20+ # Deprecated playbooks-single.rst
21+ # # If playbooks-single.rst exists, zero it out so we generate the lastest based
22+ # # on the payboook-*.rst files
23+ # if [[ -f $DOC_DIR/source/playbooks-single.rst ]]; then
24+ # :> $DOC_DIR/source/playbooks-single.rst
25+ # fi
26+
27+ # # Remove the first toctree entry and onwards from playbooks.rst to create a new
28+ # # RST playbooks-single.rst. Note, you should ensure toctree entries are at the
29+ # # end of the conent to not remove unwanted content.
30+ # if [[ -f $DOC_DIR/source/playbooks.rst ]]; then
31+
32+ # # Remove the toctree entries
33+ # awk '/toctree/ {exit} {print}' $DOC_DIR/source/playbooks.rst >> $DOC_DIR/source/playbooks-single.rst
34+
35+ # # Concat the interested RSTs into playbooks-single.rst to create a single RST
36+ # if [[ -f $DOC_DIR/source/playbook_config_setup.rst && -f $DOC_DIR/source/playbook_inventory.rst && -f $DOC_DIR/source/playbook_group_vars.rst && -f $DOC_DIR/source/playbook_run.rst ]]; then
37+
38+ # # Inform readers this is auto generated thus avoding the need to maintain
39+ # echo ".. ...........................................................................\n$(<$DOC_DIR/source/playbooks-single.rst)" > $DOC_DIR/source/playbooks-single.rst
40+ # echo ".. Auto generated restructured text .\n$(<$DOC_DIR/source/playbooks-single.rst)" > $DOC_DIR/source/playbooks-single.rst
41+ # echo ".. ...........................................................................\n$(<$DOC_DIR/source/playbooks-single.rst)" > $DOC_DIR/source/playbooks-single.rst
42+
43+ # # For each identified file we want to merge into playbooks-single.rst cat them and merge
44+ # for file in $DOC_DIR/source/playbook_config_setup.rst $DOC_DIR/source/playbook_inventory.rst $DOC_DIR/source/playbook_group_vars.rst $DOC_DIR/source/playbook_run.rst; do
45+ # echo "" >> $DOC_DIR/source/playbooks-single.rst;
46+ # cat "$file" >> $DOC_DIR/source/playbooks-single.rst;
47+ # done
48+ # else
49+ # # When unable to merge remove the auto generated RST so that is apparent
50+ # # it is not generated and will diff in a 'git status'
51+
52+ # rm -rf $DOC_DIR/source/playbooks-single.rst
53+ # fi
54+ # fi
55+ # ###############################################################################
5356
5457# If requirements-single.rst exists, zero it out so we generate the lastest based
5558# on the requirements-*.rst files
0 commit comments