1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00
docker-php-extension-installer/scripts/lint
2019-12-20 19:10:33 +01:00

16 lines
377 B
Bash
Executable file

#!/bin/sh
set -o errexit
set -o nounset
if ! docker --version >/dev/null 2>/dev/null; then
printf 'Docker is not installed, or it is not running\n' >&2
exit 1
fi
SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)"
if ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:latest fix; then
printf 'ERROR!' >&2
exit 1
fi