summaryrefslogtreecommitdiff
path: root/bin/clean_html
blob: 9e3e9c84c1c68959710b14be24c9b4bc35fc7d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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