summaryrefslogtreecommitdiff
path: root/tidy.sh
blob: 6efdb2d302d074491c86d44957638e7b6f296c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

if [ $# == 0 ]; then
  find www/ -name '*.html' -type f -print -exec tidy -mq -config tidy.conf '{}' \;
  if [ $? -lt 2 ]; then
    exit 0
  fi
else
  tidy -mq -config tidy.conf $@
  if [ $? -lt 2 ]; then
    exit 0
  fi
fi