Only add linux-surface to pacman if necessary

This commit is contained in:
Manuel Thalmann 2023-04-05 10:01:31 +02:00
parent 287dd7dc25
commit 9fa300b6cb

View file

@ -9,11 +9,14 @@ curl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg
sudo pacman-key --finger 56C464BAAC421453;
sudo pacman-key --lsign-key 56C464BAAC421453;
pacmanConf="/etc/pacman.conf";
if ! grep "^\[linux-surface\]$" "$pacmanConf"
{
echo "";
echo "[linux-surface]";
echo "Server = https://pkg.surfacelinux.com/arch/";
} | sudo tee -a /etc/pacman.conf > /dev/null;
} | sudo tee -a "$pacmanConf" > /dev/null;
sudo pacman --noconfirm -Syu;