diff options
author | Stephen Enders <smenders@gmail.com> | 2020-02-16 23:11:01 -0500 |
---|---|---|
committer | Stephen Enders <smenders@gmail.com> | 2020-02-16 23:11:01 -0500 |
commit | 4448866d696698ee9015cea99e4183c88dd8cde5 (patch) | |
tree | 475539383b9652426a0872b81d2cb4c970adaf04 | |
parent | f19d7a921dfa2c17c7c0a69f23f466874cbc9d4e (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-x | tidy.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |