summaryrefslogtreecommitdiff
path: root/libre/pacman-mirrorlist
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-10-02 05:25:53 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2020-10-02 06:03:42 -0400
commitb99aaefcab46afa8bd6ef411a7c86c97738e90cf (patch)
treeb9a7ffccedd06f0b75907fd1e72be870fd2099d3 /libre/pacman-mirrorlist
parent941400c9ede0cf02b4c7b7fca9dc484569ea1dcf (diff)
downloadabslibre-b99aaefcab46afa8bd6ef411a7c86c97738e90cf.tar.gz
abslibre-b99aaefcab46afa8bd6ef411a7c86c97738e90cf.tar.bz2
abslibre-b99aaefcab46afa8bd6ef411a7c86c97738e90cf.zip
[pacman-mirrorlist]: inject build date into mirrorlist
Diffstat (limited to 'libre/pacman-mirrorlist')
-rw-r--r--libre/pacman-mirrorlist/PKGBUILD11
1 files changed, 9 insertions, 2 deletions
diff --git a/libre/pacman-mirrorlist/PKGBUILD b/libre/pacman-mirrorlist/PKGBUILD
index cfc328ac4..233d5e31e 100644
--- a/libre/pacman-mirrorlist/PKGBUILD
+++ b/libre/pacman-mirrorlist/PKGBUILD
@@ -19,8 +19,15 @@ source=(mirrorlist-${pkgver}.txt::${url})
sha256sums=('6b6e170d0d2bdd3fc9f45ca3f0c42f52f44b8cfa33eabf4b69d6facf6fc280fe')
+prepare()
+{
+ local dt=$(LC_ALL=C date -u +%Y-%m-%d)
+
+ sed -i "s|Last Updated: .*|Last Updated: ${dt}|" "${srcdir}"/mirrorlist-${pkgver}.txt
+}
+
package()
{
- mkdir -p $pkgdir/etc/pacman.d
- install -m644 $srcdir/mirrorlist-${pkgver}.txt $pkgdir/etc/pacman.d/mirrorlist
+ mkdir -p "${pkgdir}"/etc/pacman.d
+ install -m644 "${srcdir}"/mirrorlist-${pkgver}.txt "${pkgdir}"/etc/pacman.d/mirrorlist
}