blob: 15a9898ab03a6d07d1b1f82cee678c7806aea24d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/bash
. PKGBUILD
set -e
fname=$_pkgname-1:$pkgver-$_upstream_pkgrel-${arch[0]}.pkg.tar.zst
url=https://www.archlinux.org/packages/extra/${arch[0]}/$_pkgname/download/
remote_fname=$(curl -s -LI "$url" | tr -d '\r' | awk -F/ 'tolower($0) ~ /^location:/ {print $NF}' | tail -n1)
if [ "$fname" != "$remote_fname" ]; then
echo upstream is not "$fname" but "$remote_fname" 1>&2
exit 1
fi
|