Skip to content

Commit

Permalink
feat(frankenphp): Binary
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Jan 24, 2024
1 parent 07e6ff6 commit ba0884f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions bin/frankenphp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
phpctl frankenphp $@
2 changes: 2 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
6 changes: 5 additions & 1 deletion src/frankenphp.sh
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit ba0884f

Please sign in to comment.