Skip to content

Instantly share code, notes, and snippets.

@ei-grad
Last active April 9, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ei-grad/37a0d36d07d127a7f4c101d3fcb0d49b to your computer and use it in GitHub Desktop.
Save ei-grad/37a0d36d07d127a7f4c101d3fcb0d49b to your computer and use it in GitHub Desktop.
/etc/cron.hourly/fetch-updated-packages
#!/usr/bin/chronic /bin/bash
set -e
set -x
[ -n "`nmcli c show --active | grep -f /etc/fetch-allowed-wifi-networks`" ] || exit 0
pacman -S --refresh --sysupgrade --downloadonly --noconfirm
grep KeepCurrent /etc/pacman.conf && pacman -S --clean --noconfirm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment