Add reflector hook
This commit is contained in:
parent
6312344673
commit
4b8afe70d1
1 changed files with 10 additions and 0 deletions
10
pacman_hooks/mirrorupgrade.hook
Normal file
10
pacman_hooks/mirrorupgrade.hook
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[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 'cp /etc/pacman.d/mirrorlist{,.bk} && /usr/bin/reflector --verbose -l 5 --sort rate -p https --save /etc/pacman.d/mirrorlist; if [ -f /etc/pacman.d/mirrorlist.pacnew ]; then rm /etc/pacman.d/mirrorlist.pacnew; fi'
|
Loading…
Add table
Reference in a new issue