Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
628 B

  1. #!/bin/sh
  2. # Syncs repositories and downloads updates, meant to be run as a cronjob.
  3. ping -q -c 1 1.1.1.1 > /dev/null || exit
  4. notify-send "📦 Repository Sync" "Checking for package updates..."
  5. sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
  6. Check your internet connection, if pacman is already running, or run update manually to see errors."
  7. pkill -RTMIN+8 i3blocks
  8. if pacman -Qu | grep -v "\[ignored\]"
  9. then
  10. notify-send "🎁 Repository Sync" "Updates available. Click statusbar icon (📦) for update."
  11. else
  12. notify-send "📦 Repository Sync" "Sync complete. No new packages for update."
  13. fi