@@ -6,15 +6,15 @@ function create_target_dir(){
66}
77
88function copy_resources() {
9- cp . /mkdocs.yml ${TARGET_DIR} /mkdocs.yml
10- cp -r docs/images ${TARGET_DIR} /docs
11- cp -r docs/stylesheets ${TARGET_DIR} /docs/stylesheets
9+ cp ${DATA_DIR} /mkdocs.yml ${TARGET_DIR} /mkdocs.yml
10+ cp -r ${DATA_DIR} / docs/images ${TARGET_DIR} /docs
11+ cp -r ${DATA_DIR} / docs/stylesheets ${TARGET_DIR} /docs/stylesheets
1212}
1313
1414function write_file(){
1515 FILE=$1
1616 echo " " >> ${TARGET_DIR} /docs/index.md
17- sed -e ' s/..\/image/image/g' docs/${FILE} | sed -e ' s/✘/X/g' >> ${TARGET_DIR} /docs/index.md
17+ sed -e ' s/..\/image/image/g' ${DATA_DIR} / docs/${FILE} | sed -e ' s/✘/X/g' >> ${TARGET_DIR} /docs/index.md
1818}
1919
2020function write_text(){
@@ -26,7 +26,7 @@ function write_text(){
2626function write_guidelines(){
2727 DIR=$1
2828 FIRST_HEADER=$2
29- for f in docs/${DIR} /g-* .md
29+ for f in ${DATA_DIR} / docs/${DIR} /g-* .md
3030 do
3131 echo " " >> ${TARGET_DIR} /docs/index.md
3232 sed -e " s|# |${FIRST_HEADER} |g" $f >> ${TARGET_DIR} /docs/index.md
@@ -37,10 +37,11 @@ function convert_to_pdf(){
3737 cd ${TARGET_DIR}
3838 mkdocs build
3939 cd site
40- weasyprint index.html ../.. /plsql.pdf
40+ weasyprint index.html ${DATA_DIR} /plsql.pdf
4141}
4242
43- TARGET_DIR=work-pdf
43+ DATA_DIR=" $( cd " $( dirname " ${0} " ) " && pwd) "
44+ TARGET_DIR=${DATA_DIR} /work-pdf
4445
4546create_target_dir
4647copy_resources
@@ -69,4 +70,4 @@ write_file "5-complexity-analysis/complexity-analysis.md"
6970write_file " 6-code-reviews/code-reviews.md"
7071write_file " 7-tool-support/tool-support.md"
7172write_file " 9-appendix/appendix.md"
72- convert_to_pdf
73+ # convert_to_pdf
0 commit comments