diff options
author | Erich Eckner <git@eckner.net> | 2020-10-21 07:55:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-10-21 07:55:24 +0200 |
commit | 7ee1cf6a5c0f38ca99c092738b1353f6df491f0f (patch) | |
tree | 99bba24dbbbb9c5ed9d0a66e986097092e40b24d | |
parent | 284bc9d9bfdcbc8806473013d3c4da0507af1e38 (diff) | |
download | archlinuxewe.git.save-7ee1cf6a5c0f38ca99c092738b1353f6df491f0f.tar.xz |
reflector-nomirrorlist new
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | reflector-nomirrorlist.install | 17 |
2 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000..0fc4a364 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: Hans-Nikolai Viessmann <hans AT viess DOT mn> +pkgname=reflector-nomirrorlist +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Use reflector-generated mirrorlist by default" +arch=('any') +url="https://aur.archlinux.org/packages/reflector-nomirrorlist/" +license=('unknown') +depends=('pacman' 'reflector') +provides=('pacman-mirrorlist') +conflicts=('pacman-mirrorlist') +install="${pkgname}.install" +backup=('etc/pacman.d/mirrorlist') +source=() + +package() { + # we do nothing, everything is in .install + : +} diff --git a/reflector-nomirrorlist.install b/reflector-nomirrorlist.install new file mode 100644 index 00000000..a30a2e0b --- /dev/null +++ b/reflector-nomirrorlist.install @@ -0,0 +1,17 @@ +post_install() { + echo "==> generating mirrorlist using config file" + /usr/bin/reflector @/etc/xdg/reflector/reflector.conf + + # check to make sure reflector timer is activated + if [[ ! -L "/etc/systemd/system/timers.target.wants/reflector.timer" ]]; then + echo "==$ it is suggested that you activate the reflector systemd timer" + echo "==$ to periodically update the mirrorlist! Do the following:" + echo "" + echo " sudo systemctl enable --now reflector.timer" + echo "" + fi +} + +post_update() { + post_install +} |