IMP(shfmt): add shell formatter

This commit is contained in:
Thibault Ayanides
2020-12-04 14:08:01 +01:00
parent bc1aa65b91
commit 3a342b784a
300 changed files with 2370 additions and 2427 deletions

View File

@ -12,7 +12,7 @@ if [ $# -gt 0 ]; then
shift
fi
fi
if [ -z "$target" ] ; then
if [ -z "$target" ]; then
echo "Usage: $0 <TARGET> [test_script...]" >&2
echo -n "Supported targets are: " >&2
#ls -1v "$(dirname "$0")"/docker/Dockerfile.* | sed -re 's=^.+/Dockerfile\.==' | tr "\n" " " >&2
@ -21,15 +21,12 @@ if [ -z "$target" ] ; then
exit 1
fi
dockerfile="$(dirname "$0")"/docker/Dockerfile.${target}
if [ ! -f "$dockerfile" ] ; then
echo "ERROR: No target available for $target" >&2
if [ ! -f "$dockerfile" ]; then
echo "ERROR: No target available for $target" >&2
exit 1
fi
docker build -f "$dockerfile" -t "debian_cis_test:${target}" "$(dirname "$0")"/../
docker run --rm debian_cis_test:"${target}" "$@"