diff --git a/Makefile b/Makefile index be8c748..0c8e12f 100644 --- a/Makefile +++ b/Makefile @@ -22,3 +22,4 @@ install: @sudo ln -sf $(shell pwd)/bin/pest /usr/local/bin/pest @sudo ln -sf $(shell pwd)/bin/pint /usr/local/bin/pint @sudo ln -sf $(shell pwd)/bin/exakat /usr/local/bin/exakat + @sudo ln -sf $(shell pwd)/bin/frankenphp /usr/local/bin/frankenphp diff --git a/bin/frankenphp b/bin/frankenphp new file mode 100755 index 0000000..afadd18 --- /dev/null +++ b/bin/frankenphp @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +phpctl frankenphp $@ diff --git a/installer.sh b/installer.sh index 2ab19d0..1368231 100755 --- a/installer.sh +++ b/installer.sh @@ -14,6 +14,7 @@ symlink() { sudo ln -sf "${INSTALL_DIR}/bin/pest" /usr/local/bin/pest sudo ln -sf "${INSTALL_DIR}/bin/pint" /usr/local/bin/pint sudo ln -sf "${INSTALL_DIR}/bin/exakat" /usr/local/bin/exakat + sudo ln -sf "${INSTALL_DIR}/bin/frankenphp" /usr/local/bin/frankenphp } echo "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR" @@ -43,5 +44,6 @@ else echo " sudo ln -sf ${INSTALL_DIR}/bin/pest /usr/local/bin/pest" echo " sudo ln -sf ${INSTALL_DIR}/bin/pint /usr/local/bin/pint" echo " sudo ln -sf ${INSTALL_DIR}/bin/exakat /usr/local/bin/exakat" + echo " sudo ln -sf ${INSTALL_DIR}/bin/frankenphp /usr/local/bin/frankenphp" echo "" fi diff --git a/src/frankenphp.sh b/src/frankenphp.sh index fda0ffe..d379982 100644 --- a/src/frankenphp.sh +++ b/src/frankenphp.sh @@ -1,3 +1,7 @@ frankenphp() { - PHPCTL_IMAGE=dunglas/frankenphp run -- frankenphp run --config /etc/caddy/Caddyfile --adapter caddyfile + if [ -z "$1" ]; then + PHPCTL_IMAGE=dunglas/frankenphp run -- frankenphp run --config /etc/caddy/Caddyfile --adapter caddyfile + else + PHPCTL_IMAGE=dunglas/frankenphp run -- frankenphp "$@" + fi }