From 21b5e56eea117ae0c509591a5fa1c9d79b37f383 Mon Sep 17 00:00:00 2001 From: Patrick M <65464529+p-mng@users.noreply.github.com> Date: Sat, 2 Jan 2021 00:41:13 +0100 Subject: [PATCH] Fix unnecessary reinstall of packages (#172) --- wireguard-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index fe7177b..746dd5f 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -147,11 +147,11 @@ function installWireGuard() { # Check if current running kernel is LTS ARCH_KERNEL_RELEASE=$(uname -r) if [[ ${ARCH_KERNEL_RELEASE} == *lts* ]]; then - pacman -S --noconfirm linux-lts-headers + pacman -S --needed --noconfirm linux-lts-headers else - pacman -S --noconfirm linux-headers + pacman -S --needed --noconfirm linux-headers fi - pacman -S --noconfirm wireguard-tools iptables qrencode + pacman -S --needed --noconfirm wireguard-tools iptables qrencode fi # Make sure the directory exists (this does not seem the be the case on fedora)