summaryrefslogtreecommitdiff
path: root/core/pacman-mirrorlist/update-list
blob: 6da4037a709afa34e3be4354ca570623d5c7d268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

cd "${0%/*}"

sed -i '/^[^#]/d' PKGBUILD
printf "pkgver=%s\n" "$(date '+%Y%m%d')" >> PKGBUILD
for sum_type in sha256 md5; do
  printf "%ssums=('%s')\n" \
    "${sum_type}" \
    "$(
      ${sum_type}sum mirrorlist | \
        awk '{print $1}'
    )" >> PKGBUILD
done