summaryrefslogtreecommitdiff
path: root/tidy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tidy.sh')
-rwxr-xr-xtidy.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tidy.sh b/tidy.sh
new file mode 100755
index 0000000..6efdb2d
--- /dev/null
+++ b/tidy.sh
@@ -0,0 +1,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