Last active
August 26, 2016 15:13
-
-
Save dw72/a56ad48626499f9a24f18bdbbdf6efc7 to your computer and use it in GitHub Desktop.
Hook to update pacman mirrorlist using reflector after each upgrade of pacman-mirrorlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trigger] | |
Operation = Upgrade | |
Type = Package | |
Target = pacman-mirrorlist | |
[Action] | |
Description = Updating pacman-mirrorlist with reflector and removing pacnew... | |
When = PostTransaction | |
Depends = reflector | |
Exec = /usr/bin/bash -c "reflector --country 'Poland' --latest 5 --sort rate --save /etc/pacman.d/mirrorlist && rm -f /etc/pacman.d/mirrorlist.pacnew || true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place this file in /etc/pacman.d/hooks