aboutsummaryrefslogtreecommitdiff
path: root/apk-file
diff options
context:
space:
mode:
Diffstat (limited to 'apk-file')
-rwxr-xr-xapk-file9
1 files changed, 3 insertions, 6 deletions
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 '
/<td>/ { print }
- /<td class="arch">/ { getline; getline; print }
+ /<td class="(arch|repo)">/ { getline; getline; print }
' |
sed 's/^ *//; s/<[^>]*>//g; s,&#x2F;,/,g' |
-paste - - - - |
-grep "$arch\$"
+paste - - - - - |
+grep "${2:-x86}\$"