diff --git a/assets/generate.sh b/assets/generate.sh index ee6c5276..45850f2e 100755 --- a/assets/generate.sh +++ b/assets/generate.sh @@ -1,9 +1,12 @@ echo -e ".. This file is auto-generated by Makefile\n\tDO NOT EDIT\n\n" > index.rst +echo -e "# This file is auto-generated by generator.sh\n# DO NOT EDIT MANUALLY" > .gitignore +echo "index.rst" >> .gitignore for i in `find notes/ -mindepth 1 -maxdepth 1 -type d|sort`; do echo "Scanning directory $i" + echo "$i.md" >> .gitignore # This will exclude auto-generated files from git echo -e "" > $i.md # To set name in toctree use :caption: - echo -e ".. toctree::\n\t:maxdepth: 3\n\n\tassets/$i.md\n" >> index.rst + echo -e ".. toctree::\n\t:maxdepth: 2\n\n\tassets/$i.md\n" >> index.rst for j in `find $i -type f -name \\*md|sort`; do echo "$j" echo -e "---\n_Notatki z pliku \`$j\`_" >> $i.md