Skip to content

Instantly share code, notes, and snippets.

@asahasrabuddhe
Created August 14, 2019 05:40
Show Gist options
  • Save asahasrabuddhe/682317b7f4fe9c72825f72211f38fec2 to your computer and use it in GitHub Desktop.
Save asahasrabuddhe/682317b7f4fe9c72825f72211f38fec2 to your computer and use it in GitHub Desktop.
Pacman Mirror List Upgrade Hook
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = pacman-mirrorlist
[Action]
Description = Updating mirrorlist...
When = PostTransaction
Depends = reflector
Exec = /usr/bin/reflector --latest 10 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist; rm -f /etc/pacman.d/mirrorlist.pacnew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment