summaryrefslogtreecommitdiff
path: root/tidy.sh
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2023-06-21 20:31:43 -0400
committerSteph Enders <steph@senders.io>2023-06-21 20:31:43 -0400
commitdb1d929f35ca976b27b4ba042b3c81bb42412906 (patch)
treebdfc31d694fc1a527b29c971698a44d1c25a5eb5 /tidy.sh
parenta1d37cf969f93d4ee7a52aecbf139563c878355f (diff)
Add tidy and tidy the content
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