From 9d07cbc04a97a03034b2deb2107cb86db28b0f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 20 Nov 2020 00:54:34 +0100 Subject: Add 'apk-file' tool --- apk-file | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 apk-file 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 ' + // { print } + // { getline; getline; print } +' | +sed 's/^ *//; s/<[^>]*>//g; s,/,/,g' | +paste - - - - | +grep "$arch\$" -- cgit v1.2.3