diff options
Diffstat (limited to 'apk-file')
-rwxr-xr-x | apk-file | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apk-file b/apk-file new file mode 100755 index 0000000..6ad3064 --- /dev/null +++ b/apk-file @@ -0,0 +1,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,/,/,g' | +paste - - - - | +grep "$arch\$" |