Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2013 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5635392 to your computer and use it in GitHub Desktop.
Save anonymous/5635392 to your computer and use it in GitHub Desktop.
Script for polling and downloading (not installing) updates from pacman and writing them into /home/$user/.pacmanupdates for the pacman sublet to read.
#!/bin/bash
# Run as root
# Requires community/expac
user="your username"
# Download packages needing an update
nice -n 50 pacman -Syuwq --noconfirm > /dev/null
# Write the packages needing an update to file
pacman -Quq | tr "\\n" " " | xargs expac -S '%r/%n [%v]' > /home/$user/.pacmanupdates
# Update sublet
subtler -su pacman > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment