diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2018-12-03 10:49:37 +0100 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2018-12-03 10:49:37 +0100 |
| commit | 5546c6d6da43e878edc74ef8a52db4f4cf563ee0 (patch) | |
| tree | c8aaaf1a4fd5ded7ae3389abb38753ad714bef80 /bin/clean_html | |
| parent | c380288db8005730b53906ce9de311fd682fa36c (diff) | |
Update clean_html to handle markdown sources too
Diffstat (limited to 'bin/clean_html')
| -rwxr-xr-x | bin/clean_html | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/clean_html b/bin/clean_html index e2bf0e799..9e3e9c84c 100755 --- a/bin/clean_html +++ b/bin/clean_html @@ -1,8 +1,20 @@ #!/bin/bash -### This script finds all .t2t (txt2tags) files and deletes the corresponding html file +# This script finds all .t2t (txt2tags) and .md (markdown) files +# and deletes the corresponding html file find . -name '*.t2t' | while read t2t ; do html="${t2t%.t2t}.html" - rm -f "$html" + if [ -f "$html" ] ; then + echo "$html" + rm -f "$html" + fi +done + +find . -name '*.md' | while read md ; do + html="${md%.md}.html" + if [ -f "$html" ] ; then + echo "$html" + rm -f "$html" + fi done |
