From 6e23c239779c290eb7f50a9718159eadd18e1a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 20 Nov 2020 01:06:10 +0100 Subject: Show repo in apk-file output --- apk-file | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apk-file') diff --git a/apk-file b/apk-file index 6ad3064..ede71d1 100755 --- a/apk-file +++ b/apk-file @@ -1,13 +1,10 @@ #!/bin/sh -arch=$2 -: ${arch:=x86} - curl -s "https://pkgs.alpinelinux.org/contents?file=$1" | awk ' // { print } - // { getline; getline; print } + // { getline; getline; print } ' | sed 's/^ *//; s/<[^>]*>//g; s,/,/,g' | -paste - - - - | -grep "$arch\$" +paste - - - - - | +grep "${2:-x86}\$" -- cgit v1.2.3