aboutsummaryrefslogtreecommitdiff
path: root/apk-file
blob: 6ad3064cd22adb029937c686444c90c5c92c0b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

arch=$2
: ${arch:=x86}

curl -s "https://pkgs.alpinelinux.org/contents?file=$1" |
awk '
	/<td>/ { print }
	/<td class="arch">/ { getline; getline; print }
' |
sed 's/^ *//; s/<[^>]*>//g; s,&#x2F;,/,g' |
paste - - - - |
grep "$arch\$"