summaryrefslogtreecommitdiff
path: root/reflector-nomirrorlist
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-10-21 08:12:35 +0200
committerErich Eckner <git@eckner.net>2020-10-21 08:12:35 +0200
commit672be3ab57a5acf179366f2ce60c24b63e001fa3 (patch)
treee7a10622f50e505cccaa8a406c1ca8d2b5c3230a /reflector-nomirrorlist
parent14a8c158c2b598396c1b92c3186247369d65ac44 (diff)
downloadarchlinuxewe-672be3ab57a5acf179366f2ce60c24b63e001fa3.tar.xz
reflector-nomirrorlist: moved to correct location
Diffstat (limited to 'reflector-nomirrorlist')
-rw-r--r--reflector-nomirrorlist/PKGBUILD20
-rw-r--r--reflector-nomirrorlist/reflector-nomirrorlist.install17
2 files changed, 37 insertions, 0 deletions
diff --git a/reflector-nomirrorlist/PKGBUILD b/reflector-nomirrorlist/PKGBUILD
new file mode 100644
index 000000000..0fc4a3648
--- /dev/null
+++ b/reflector-nomirrorlist/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/reflector-nomirrorlist.install b/reflector-nomirrorlist/reflector-nomirrorlist.install
new file mode 100644
index 000000000..a30a2e0b8
--- /dev/null
+++ b/reflector-nomirrorlist/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
+}