Don't use apt-get add on Debian Bullseye

pull/424/head
Michele Locati 2021-08-25 09:05:17 +02:00
parent 89263593b5
commit f40863af77
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
1 changed files with 6 additions and 1 deletions

View File

@ -1385,7 +1385,12 @@ installMicrosoftSqlServerODBC() {
debian)
# https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#debian17
printf -- '- installing the Microsoft APT key\n'
if test $DISTRO_VERSION_NUMBER -ge 11; then
# apt-key is deprecated
curl -sSLf -o /etc/apt/trusted.gpg.d/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc
else
curl -sSLf https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
fi
if ! test -f /etc/apt/sources.list.d/mssql-release.list; then
printf -- '- adding the Microsoft APT source list\n'
curl -sSLf https://packages.microsoft.com/config/debian/$DISTRO_VERSION_NUMBER/prod.list >/etc/apt/sources.list.d/mssql-release.list