summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Enders <smenders@gmail.com>2020-02-16 23:11:01 -0500
committerStephen Enders <smenders@gmail.com>2020-02-16 23:11:01 -0500
commit4448866d696698ee9015cea99e4183c88dd8cde5 (patch)
tree475539383b9652426a0872b81d2cb4c970adaf04
parentf19d7a921dfa2c17c7c0a69f23f466874cbc9d4e (diff)
Update tidy.sh to allow for specific files
Rather than have it run across the entire project, enable it to run for given file arguments. By default it will still run against all html files in the project
-rwxr-xr-xtidy.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tidy.sh b/tidy.sh
index 3def05e..7ac0409 100755
--- a/tidy.sh
+++ b/tidy.sh
@@ -1,2 +1,7 @@
#!/usr/bin/env bash
-find . -name '*.html' -type f -print -exec tidy -mq -config tidy.conf '{}' \;
+
+if [ $# == 0 ]; then
+ find . -name '*.html' -type f -print -exec tidy -mq -config tidy.conf '{}' \;
+else
+ tidy -mq -config tidy.conf $@
+fi