fix shellcheck warnings in git hook example

Signed-off-by: andreswebs <andreswebs@pm.me>
This commit is contained in:
andreswebs
2021-03-08 22:24:35 -03:00
parent 9d9edfa38a
commit 9cdcbbe7f4

View File

@@ -111,11 +111,9 @@ make a commit. See also [git hooks] documentation.
#!/bin/sh
# Keep module docs up to date
for d in $(ls -1 modules)
do
terraform-docs md modules/$d > modules/$d/README.md
if [ $? -eq 0 ] ; then
git add "./modules/$d/README.md"
for d in modules/*; do
if terraform-docs md "$d" > "$d/README.md"; then
git add "./$d/README.md"
fi
done
```