wmdeit-cf-wmdelib/scripts/install-php-repo.sh

26 lines
493 B
Bash
Raw Normal View History

2023-10-29 00:10:51 +00:00
#!/bin/sh
2023-10-24 14:28:15 +00:00
# To add this repository please do:
2023-10-29 00:10:51 +00:00
set -x
2023-10-24 14:28:15 +00:00
echo $1 $2 $3
echo "PARAMS $1 $2 $3"
if [ -n "$3" ]; then
echo "it dollaar 3"
2023-10-29 00:10:51 +00:00
wget -O /etc/apt/trusted.gpg.d/$1.gpg $3
echo "deb $2 $(lsb_release -sc) main" > /etc/apt/sources.list.d/$1.list
chmod 644 /etc/apt/sources.list.d/$1.list
chmod 644 /etc/apt/trusted.gpg.d/$1.gpg
2023-10-24 14:28:15 +00:00
else
echo "its not $3"
echo "deb $2 $(lsb_release -sc) main" > /etc/apt/sources.list.d/$1.list
fi
2023-10-29 00:10:51 +00:00
apt-get update -y
2023-10-24 14:28:15 +00:00