Last active
November 7, 2023 15:06
-
-
Save Razuuu/f646c3be44c5ba3b9c8e38b0a856d7b4 to your computer and use it in GitHub Desktop.
Add php repository from sury.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Debian Repository not available for trixie (yet) | |
DISTRO=$(dpkg --status tzdata|grep Provides|cut -f2 -d'-') | |
if [ "${DISTRO}" == "trixie" ]; then DISTRO="bookworm"; fi | |
# Install dependencies | |
apt update | |
apt install apt-transport-https ca-certificates curl -y | |
# Download gpg key | |
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg | |
# Add Debian Repository | |
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO} main" > /etc/apt/sources.list.d/deb.sury.org.list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment