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