Files
2024-01-25 12:54:01 +01:00

20 lines
310 B
Bash
Executable File

#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- node "$@"
fi
if [ "$1" = 'node' ] || [ "$1" = 'yarn' ]; then
yarn install
npm rebuild node-sass
>&2 echo "Waiting for PHP to be ready..."
until nc -z "$PHP_HOST" "$PHP_PORT"; do
sleep 1
done
fi
exec "$@"