From f3497b97a93282187ba65d9b5d263aae46ba8b92 Mon Sep 17 00:00:00 2001 From: Jason Hilder Date: Wed, 27 May 2026 09:10:20 +0200 Subject: [PATCH] Moved php install into dedicated script. --- install.sh | 2 -- scripts/install_php | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 scripts/install_php diff --git a/install.sh b/install.sh index 05ad349..ce1ff35 100755 --- a/install.sh +++ b/install.sh @@ -121,8 +121,6 @@ if [ "$DO_INSTALL" = true ]; then build-essential make bear valgrind fish tmux ca-certificates gnupg libfuse2 rsync fonts-symbola fonts-noto fonts-noto-color-emoji - # php - php-cli php-mysql php-curl php-mbstring php-zip ) MISSING_PACKAGES=() diff --git a/scripts/install_php b/scripts/install_php new file mode 100755 index 0000000..275d4b3 --- /dev/null +++ b/scripts/install_php @@ -0,0 +1,26 @@ +#!/bin/bash + +# --------------------------------------------------------------------------------- +# Golang install recipe +# Fetches the latest stable Go release, installs to /usr/local/go, +# then installs go-based CLI tools. +# --------------------------------------------------------------------------------- + +set -e + +# install the Debian 13 php version +sudo apt install php-cli php-mysql php-curl php-mbstring php-zip + +reload + +# install/download composer +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" +php composer-setup.php +php -r "unlink('composer-setup.php');" + +# Move composer bin +sudo mv composer.phar /usr/local/bin/composer + +echo "" +echo "✅ PHP setup complete."