Skip to content

Instantly share code, notes, and snippets.

@ysl2
Forked from gr33n7007h/mirror_update.hook
Created March 11, 2022 06:58
Show Gist options
  • Save ysl2/662967efa5f803091066ac887295763e to your computer and use it in GitHub Desktop.
Save ysl2/662967efa5f803091066ac887295763e to your computer and use it in GitHub Desktop.
Update mirrors.
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /bin/sh -c "reflector --protocol https --country 'United Kingdom' --score 10 --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