1
0
forked from GitHub/gf-core
Files
gf-core/bin/clean_html
2018-12-03 10:49:37 +01:00

21 lines
400 B
Bash
Executable File

#!/bin/bash
# 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"
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