|
26 | 26 |
|
27 | 27 | case ${OS} in |
28 | 28 | Linux*) |
29 | | - if command -v dnf >/dev/null 2>&1; then |
30 | | - echo "📦 Detected dnf. Installing FrankenPHP from RPM repository..." |
31 | | - if [ -n "${SUDO}" ]; then |
32 | | - echo "❗ Enter your password to grant sudo powers for package installation" |
33 | | - ${SUDO} -v || true |
| 29 | + if [ "${ARCH}" = "aarch64" ] || [ "${ARCH}" = "x86_64" ]; then |
| 30 | + if command -v dnf >/dev/null 2>&1; then |
| 31 | + echo "📦 Detected dnf. Installing FrankenPHP from RPM repository..." |
| 32 | + if [ -n "${SUDO}" ]; then |
| 33 | + echo "❗ Enter your password to grant sudo powers for package installation" |
| 34 | + ${SUDO} -v || true |
| 35 | + fi |
| 36 | + ${SUDO} dnf -y install https://rpm.henderkes.com/static-php-1-0.noarch.rpm |
| 37 | + ${SUDO} dnf -y module enable php-zts:static-8.4 || true |
| 38 | + ${SUDO} dnf -y install frankenphp |
| 39 | + echo |
| 40 | + echo "🥳 FrankenPHP installed successfully" |
| 41 | + echo |
| 42 | + echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" |
| 43 | + exit 0 |
34 | 44 | fi |
35 | | - ${SUDO} dnf -y install https://rpm.henderkes.com/static-php-1-0.noarch.rpm |
36 | | - ${SUDO} dnf -y module enable php-zts:static-8.4 || true |
37 | | - ${SUDO} dnf -y install frankenphp |
38 | | - echo |
39 | | - echo "🥳 FrankenPHP installed successfully" |
40 | | - echo |
41 | | - echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" |
42 | | - exit 0 |
43 | | - fi |
44 | 45 |
|
45 | | - if command -v apt >/dev/null 2>&1 || command -v apt-get >/dev/null 2>&1; then |
46 | | - echo "📦 Detected apt. Installing FrankenPHP from DEB repository..." |
47 | | - if [ -n "${SUDO}" ]; then |
48 | | - echo "❗ Enter your password to grant sudo powers for package installation" |
49 | | - ${SUDO} -v || true |
50 | | - fi |
51 | | - ${SUDO} sh -c 'curl -fsSL https://key.henderkes.com/static-php.gpg -o /usr/share/keyrings/static-php.gpg' |
52 | | - ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/static-php.gpg] https://deb.henderkes.com/ stable main" > /etc/apt/sources.list.d/static-php.list' |
53 | | - if command -v apt >/dev/null 2>&1; then |
| 46 | + if command -v apt >/dev/null 2>&1 || command -v apt-get >/dev/null 2>&1; then |
| 47 | + echo "📦 Detected apt. Installing FrankenPHP from DEB repository..." |
| 48 | + if [ -n "${SUDO}" ]; then |
| 49 | + echo "❗ Enter your password to grant sudo powers for package installation" |
| 50 | + ${SUDO} -v || true |
| 51 | + fi |
| 52 | + ${SUDO} sh -c 'curl -fsSL https://key.henderkes.com/static-php.gpg -o /usr/share/keyrings/static-php.gpg' |
| 53 | + ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/static-php.gpg] https://deb.henderkes.com/ stable main" > /etc/apt/sources.list.d/static-php.list' |
| 54 | + if command -v apt >/dev/null 2>&1; then |
54 | 55 | ${SUDO} apt update |
55 | 56 | ${SUDO} apt -y install frankenphp |
56 | | - else |
| 57 | + else |
57 | 58 | ${SUDO} apt-get update |
58 | 59 | ${SUDO} apt-get -y install frankenphp |
| 60 | + fi |
| 61 | + echo |
| 62 | + echo "🥳 FrankenPHP installed successfully." |
| 63 | + echo |
| 64 | + echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" |
| 65 | + exit 0 |
59 | 66 | fi |
60 | | - echo |
61 | | - echo "🥳 FrankenPHP installed successfully." |
62 | | - echo |
63 | | - echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" |
64 | | - exit 0 |
65 | 67 | fi |
66 | 68 |
|
67 | 69 | case ${ARCH} in |
|
0 commit comments