Skip to content

Instantly share code, notes, and snippets.

@samyakb
Created August 9, 2020 08:53
Show Gist options
  • Select an option

  • Save samyakb/c5fbddb631e4869f0e0fa00f5e643ab7 to your computer and use it in GitHub Desktop.

Select an option

Save samyakb/c5fbddb631e4869f0e0fa00f5e643ab7 to your computer and use it in GitHub Desktop.
pacman refelector hook to update mirrorlist
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrolist with reflector and removing pacnew
When = PostTransaction
Depends = reflector
Exec = /bin/sh -c "reflector --latest 100 --age 24 --sort rate --save /etc/pacman.d/mirrorlist; rm -rf /etc/pacman.d/mirrorlist.pacnew"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment