cri-o/vendor/github.com/opencontainers/runc/script/validate-shfmt
Antonio Murdaca c258a2d8f0
bump runc@b263a43430ac6996a4302b891688544225197294
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-02-07 10:57:46 +01:00

21 lines
430 B
Bash
Executable file

#!/bin/bash
badFiles=()
while read f; do
badFiles+=("$f")
done < <(shfmt -l . | grep -v Godeps/)
if [ ${#badFiles[@]} -eq 0 ]; then
echo 'Congratulations! All shell source files are properly formatted.'
else
{
echo "These files are not properly shfmt'd:"
for f in "${badFiles[@]}"; do
echo " - $f"
done
echo
echo 'Please reformat the above files using "shfmt -w" and commit the result.'
echo
} >&2
false
fi