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

26 lines
493 B
Bash

#!/bin/sh
# To add this repository please do:
set -x
echo $1 $2 $3
echo "PARAMS $1 $2 $3"
if [ -n "$3" ]; then
echo "it dollaar 3"
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
else
echo "its not $3"
echo "deb $2 $(lsb_release -sc) main" > /etc/apt/sources.list.d/$1.list
fi
apt-get update -y