diff options
author | Denton Liu | 2020-12-06 05:06:01 -0800 |
---|---|---|
committer | Denton Liu | 2020-12-06 05:06:01 -0800 |
commit | 0bfa3d3170c01247862dd5f64ff12ed0810f5594 (patch) | |
tree | 35811a101696a74b5283ed97f0e3f12666a3196e | |
download | aur-0bfa3d3170c01247862dd5f64ff12ed0810f5594.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | reflector-mirrorlist-update.hook | 10 |
3 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..07292bd62d24 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = reflector-mirrorlist-update + pkgdesc = Use reflector to update mirrorlist when pacman-mirrorlist is updated + pkgver = 1.0 + pkgrel = 1 + arch = any + license = GPL + depends = sh + depends = systemd + depends = reflector + source = reflector-mirrorlist-update.hook + sha256sums = 86c37645da78cfd7fe29cfe9e4fbe798dc0d9b0c3aa306364178d0f7d5b3c7f1 + +pkgname = reflector-mirrorlist-update + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e413db6d4156 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,16 @@ +# Maintainer: Denton Liu <liu.denton@gmail.com> + +pkgname=reflector-mirrorlist-update +pkgver=1.0 +pkgrel=1 +pkgdesc="Use reflector to update mirrorlist when pacman-mirrorlist is updated" +arch=('any') +license=('GPL') +depends=('sh' 'systemd' 'reflector') +source=("${pkgname}.hook") +sha256sums=('86c37645da78cfd7fe29cfe9e4fbe798dc0d9b0c3aa306364178d0f7d5b3c7f1') + +package() { + cd "$srcdir" + install -Dm 644 "${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook" +} diff --git a/reflector-mirrorlist-update.hook b/reflector-mirrorlist-update.hook new file mode 100644 index 000000000000..1992c2f6c778 --- /dev/null +++ b/reflector-mirrorlist-update.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = pacman-mirrorlist + +[Action] +Description = Updating mirrorlist with reflector... +When = PostTransaction +Exec = /bin/sh -c 'systemctl start reflector.service && rm -f /etc/pacman.d/mirrorlist.pacnew' |