aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-01-08 09:58:59 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-01-08 10:07:33 +0100
commit2c324f6facc91c7fa5013bec3b91cf547c35bd84 (patch)
tree42681f08b59aa0188f5fcffe28b3a07cac62e3df /systemd
parent174c634ae4bffd643ab66634f1155f5b862fd1e5 (diff)
downloadpacman-offline-2c324f6facc91c7fa5013bec3b91cf547c35bd84.tar.gz
pacman-offline-2c324f6facc91c7fa5013bec3b91cf547c35bd84.tar.zst
attempt to install archlinux-keyring only if needed
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/pacman-offline4
1 files changed, 3 insertions, 1 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index aab687b..e1b368e 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -11,7 +11,9 @@ fi
rm -f /system-update
# install updates
-pacman --sync --noconfirm --needed archlinux-keyring
+if [ "$(pacman --sync --print --needed archlinux-keyring | wc -l)" -gt 0 ]; then
+ pacman --sync --noconfirm --needed archlinux-keyring
+fi
pacman --sync --noconfirm --sysupgrade
# clean up package cache