aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2018-10-05 08:52:53 -0600
committerAdam Hovorka <[email protected]>2018-10-05 08:52:53 -0600
commit5f0f094e81c935635d875fa26ab0ef1517c83652 (patch)
tree8c246713a0e2a2238005b9e8d64937759a89c99f
parent9dcc235e7902f9284a65d7a3a49d2801935c5d1f (diff)
Add reflector pacman mirrorupgrade.hook
-rw-r--r--etc-pacman.d-hooks-mirrorupgrade.hook10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc-pacman.d-hooks-mirrorupgrade.hook b/etc-pacman.d-hooks-mirrorupgrade.hook
new file mode 100644
index 0000000..4769ee4
--- /dev/null
+++ b/etc-pacman.d-hooks-mirrorupgrade.hook
@@ -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 "reflector --country 'United States' --latest 100 --age 24 --sort rate --save /etc/pacman.d/mirrorlist; rm -f /etc/pacman.d/mirrorlist.pacnew"