2017-12-05 10:48:08 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
RES=0
|
|
|
|
|
|
|
|
for dockerfile in "$@"; do
|
2018-06-21 14:48:22 -04:00
|
|
|
if grep -qE '^\s+[[:upper:]]+\s+' "$dockerfile"; then
|
2017-12-05 10:48:08 +01:00
|
|
|
echo "ERROR: $dockerfile has indented Dockerfile instruction" >&2
|
2018-06-21 14:48:22 -04:00
|
|
|
grep -E '^\s+[[:upper:]]+\s+' "$dockerfile"
|
2017-12-05 10:48:08 +01:00
|
|
|
RES=1
|
|
|
|
fi
|
2018-07-26 14:50:39 -04:00
|
|
|
|
|
|
|
if grep -qE '^\s+\{\{ macros\.install_packages' "$dockerfile"; then
|
|
|
|
echo "ERROR: $dockerfile has indented Dockerfile instruction" >&2
|
|
|
|
grep -E '^\s+\{\{ macros\.install_packages' "$dockerfile"
|
|
|
|
RES=1
|
|
|
|
fi
|
2017-12-05 10:48:08 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
exit $RES
|