diff options
author | John Ankarström <john@ankarstrom.se> | 2020-11-20 01:06:10 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-11-20 01:06:10 +0100 |
commit | 6e23c239779c290eb7f50a9718159eadd18e1a46 (patch) | |
tree | 07ee5358c2622cd9bb8e7390e57a31f4bdb60e81 /apk-file | |
parent | 9d07cbc04a97a03034b2deb2107cb86db28b0f71 (diff) | |
download | alpine-6e23c239779c290eb7f50a9718159eadd18e1a46.tar.gz |
Show repo in apk-file output
Diffstat (limited to 'apk-file')
-rwxr-xr-x | apk-file | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,13 +1,10 @@ #!/bin/sh -arch=$2 -: ${arch:=x86} - curl -s "https://pkgs.alpinelinux.org/contents?file=$1" | awk ' /<td>/ { print } - /<td class="arch">/ { getline; getline; print } + /<td class="(arch|repo)">/ { getline; getline; print } ' | sed 's/^ *//; s/<[^>]*>//g; s,/,/,g' | -paste - - - - | -grep "$arch\$" +paste - - - - - | +grep "${2:-x86}\$" |