aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCody Ramaker2018-02-01 09:04:25 -0600
committerCody Ramaker2018-02-01 09:04:25 -0600
commitb9a5571d62041cfc9fbefde0f416237a838a2384 (patch)
treeef1a0451d6c7443304bacfd91a0e9a165af3ada5 /PKGBUILD
parent0c6c9f338597b0815a1918e957f56c397f9c873f (diff)
downloadaur-b9a5571d62041cfc9fbefde0f416237a838a2384.tar.gz
Incorporate closest Apache mirror logic
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c3515ed668a8..395abd367c39 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,8 @@ backup=(etc/zookeeper/configuration.xsl
etc/zookeeper/zoo.cfg)
install=install_zookeeper.sh
-_closest="https://archive.apache.org/dist/"
+_apache_cgi="http://www.apache.org/dyn/closer.cgi"
+_closest=$(curl "${_apache_cgi}?asjson=1" | tr -d '\n ' | sed -r 's/.*"preferred":"(.+)".*/\1/')
_app_path="/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz"
source=(${_closest}/${_app_path}
systemd_zookeeper.service