summaryrefslogtreecommitdiff
path: root/tidy.sh
diff options
context:
space:
mode:
authorBill <bill@billserver.senders.io>2022-11-06 11:42:43 -0500
committerBill <bill@billserver.senders.io>2022-11-06 11:44:09 -0500
commit75fe6dd67e4affaa5d97d467fd2c30a163d90712 (patch)
treecf52f0e0b3cd8530a2bff9af2a9c18457267aea6 /tidy.sh
parent768f44a55bf757abe1bfc0829de301ade964354e (diff)
Add script for blog publishing
Since a blog is written to the index.html its fairly easy to provide just the date and the md file. There still requires the line writing to the Blog Index. Also suppress warning exit from tidy which outputs a 1 if warnings and a 2 if errors were present. This method allows tidy.sh to be scriptable making warnings only return a 0 as well (so I can still use set -e in the scripts)
Diffstat (limited to 'tidy.sh')
-rwxr-xr-xtidy.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tidy.sh b/tidy.sh
index 6fd975e..6efdb2d 100755
--- a/tidy.sh
+++ b/tidy.sh
@@ -2,6 +2,12 @@
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