Skip to content

Instantly share code, notes, and snippets.

@p0rkjello
Forked from jaksi/mirrorlist.hook
Last active August 26, 2016 15:06
Show Gist options
  • Save p0rkjello/57c3b0455490beb8c00a7214d2c46d8a to your computer and use it in GitHub Desktop.
Save p0rkjello/57c3b0455490beb8c00a7214d2c46d8a to your computer and use it in GitHub Desktop.
Update pacman mirrorlist using reflector after each upgrade of pacman-mirrorlist
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = pacman-mirrorlist
[Action]
Description = Updating mirrorlist...
When = PostTransaction
Depends = reflector
Exec = "/usr/bin/reflector --country 'United States' --latest 5 --fastest 5 --sort rate --save /etc/pacman.d/mirrorlist && [[ -f /etc/pacman.d/mirrorlist.pacnew ]] && rm /etc/pacman.d/mirrorlist.pacnew"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment