Files
dotfiles/.local/bin/cron/checkup

17 lines
599 B
Plaintext
Raw Normal View History

2021-04-07 22:56:28 +01:00
#!/bin/sh
# Syncs repositories and downloads updates, meant to be run as a cronjob.
notify-send " Repository Sync" "Checking for package updates..."
2021-04-07 22:56:28 +01:00
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
Check your internet connection, if pacman is already running, or run update manually to see errors."
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
if pacman -Qu | grep -v "\[ignored\]"
then
notify-send " Repository Sync" "Updates available. Click statusbar icon () for update."
2021-04-07 22:56:28 +01:00
else
notify-send " Repository Sync" "Sync complete. No new packages for update."
2021-04-07 22:56:28 +01:00
fi