mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-11-26 20:15:03 +01:00
04989ff86d
Co-authored-by: Michele Locati <michele@locati.it> Co-authored-by: Quan TRAN <itscaro@users.noreply.github.com>
31 lines
728 B
Bash
Executable File
31 lines
728 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 build -t docker-php-extension-installer-shfmt:latest -f scripts/Dockerfile-shfmt -q .; then
|
|
printf 'ERROR!' >&2
|
|
exit 1
|
|
fi
|
|
|
|
fix() {
|
|
printf 'Fixing %s... ' "$1"
|
|
if docker run --rm -v "$SRC_DIR:/src" -w /src docker-php-extension-installer-shfmt:latest shfmt -s -ln posix -i 0 -ci -kp -w "$1"; then
|
|
printf 'done.\n'
|
|
fi
|
|
}
|
|
|
|
fix install-php-extensions
|
|
fix scripts/common
|
|
fix scripts/lint
|
|
fix scripts/travisci-test-extensions
|
|
fix scripts/travisci-update-readme
|
|
fix scripts/update-readme
|