ci: syntax

This commit is contained in:
Michael Grote 2024-01-29 12:12:01 +01:00
parent 6d04a8ba01
commit aa8eff5ce5

View file

@ -22,13 +22,12 @@ steps:
image: registry.mgrote.net/allzweckcontainer
commands:
- |
"if find . -type f -not -path '/.git/' -exec file {} ; | grep -q "shell script"; then
find . -type f -not -path '/.git/' -exec file {} ; | grep "shell script" | awk -F':' '{print $1}' | xargs -n1 shellcheck
exit 1
else
echo "No files specified."
exit 0
fi"
find . -type f -not -path './.git/*' -not -path './collections/*' -exec file {} \; | while IFS= read -r line; do
if echo "$line" | grep -q "shell script"; then
file_path=$(echo "$line" | awk -F':' '{print $1}')
shellcheck "$file_path"
fi
done
when:
event:
exclude: