Skip to content

Commit 94baec5

Browse files
committed
feat: add frankenphp
1 parent 82ca5b3 commit 94baec5

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "frankenphp",
3+
"id": "frankenphp",
4+
"version": "1.0.0",
5+
"description": "Install frankenphp, the Modern PHP App Server, written in Go",
6+
"options": {
7+
"version": {
8+
"type": "string",
9+
"description": "The frankenphp version to install",
10+
"default": ""
11+
}
12+
}
13+
}

src/frankenphp/install.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
get_architecture()
6+
{
7+
local uname_m="$(uname -m)"
8+
9+
case "${uname_m}" in
10+
x86_64)
11+
echo "amd64"
12+
;;
13+
arm64|aarch64)
14+
echo "arm64"
15+
;;
16+
arm)
17+
echo "armhf"
18+
;;
19+
*)
20+
echo >&2 "unsupported architecture: ${uname_m}"
21+
exit 1
22+
esac
23+
}
24+
25+
FRANKENPHP_VERSION="${VERSION:-1.9.1}"
26+
FRANKENPHP_ARCH="$(get_architecture)"
27+
FRANKENPHP_DOWNLOAD_URL="https://github.com/php/frankenphp/releases/download/v${FRANKENPHP_VERSION}/frankenphp_${FRANKENPHP_VERSION}-1_${FRANKENPHP_ARCH}.deb"
28+
29+
FRANKENPHP_PACKAGE_FILE="/tmp/frankenphp.deb"
30+
31+
curl -fsSL "${FRANKENPHP_DOWNLOAD_URL}" -o "${FRANKENPHP_PACKAGE_FILE}"
32+
sudo dpkg -i "${FRANKENPHP_PACKAGE_FILE}"
33+
rm "${FRANKENPHP_PACKAGE_FILE}"

0 commit comments

Comments
 (0)