aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-10-11 13:18:25 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-10-11 13:18:25 +0200
commiteed20ee3c18cd31b987530b89fd9847764c790a5 (patch)
tree0a84236b39803e4b1a671ec9ce8593f8e6b865fc
parent2037d30a9fc3e5efdcdeadedbc2bff746a6b9daf (diff)
downloadpacman-offline-eed20ee3c18cd31b987530b89fd9847764c790a5.tar.gz
pacman-offline-eed20ee3c18cd31b987530b89fd9847764c790a5.tar.zst
always use long options
-rwxr-xr-xbin/pacman-offline6
-rwxr-xr-xsystemd/pacman-offline6
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index 4a28dac..534a0a9 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -26,7 +26,7 @@ while getopts 'fhry' opt; do
REBOOT=1
;;
y)
- pacman -Sy
+ pacman --sync --refresh
;;
esac
done
@@ -41,13 +41,13 @@ fi
rm -f /system-update
# check for available updates
-if [ "$(pacman -Sup | wc -l)" -eq 0 ]; then
+if [ "$(pacman --sync --sysupgrade --print | wc -l)" -eq 0 ]; then
echo "No updates available."
exit 0
fi
# download packages
-pacman -Suw --noconfirm
+pacman --sync --noconfirm --sysupgrade --downloadonly
# enable system update
ln -sf /var/cache/pacman/pkg /system-update
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 5fecdb6..aab687b 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -11,11 +11,11 @@ fi
rm -f /system-update
# install updates
-pacman -S --noconfirm --needed archlinux-keyring
-pacman -Su --noconfirm
+pacman --sync --noconfirm --needed archlinux-keyring
+pacman --sync --noconfirm --sysupgrade
# clean up package cache
-pacman -Sc --noconfirm
+pacman --sync --noconfirm --clean
# reboot
systemctl reboot