Skip to content

Commit

Permalink
generator.sh: generate .gitignore to exclude auto-generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Mar 3, 2024
1 parent bb91e0a commit 38f8c8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/generate.sh
Original file line number Diff line number Diff line change
@@ -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 "<!--This file is auto-generated by Makefile\n----DO NOT EDIT -->" > $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
Expand Down

0 comments on commit 38f8c8e

Please sign in to comment.