summaryrefslogtreecommitdiff
path: root/bin/pkgsiz
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2026-01-15 22:34:35 -0500
committerSam Nystrom <sam@samnystrom.dev>2026-01-15 22:34:35 -0500
commitc40794b2040330ec2625bedf7df961115680c08b (patch)
tree4ff1d4fda76d5d59d5d3604a015cc474438ab470 /bin/pkgsiz
parent8fdacc55625a04f94d3e364d53aeec84bc93f6be (diff)
update bin
Diffstat (limited to 'bin/pkgsiz')
-rwxr-xr-xbin/pkgsiz11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/pkgsiz b/bin/pkgsiz
new file mode 100755
index 0000000..6ad7be0
--- /dev/null
+++ b/bin/pkgsiz
@@ -0,0 +1,11 @@
+#!/bin/sh
+apk info | xargs apk info -s | awk '
+/ installed size:$/ {
+ sub(/-[^-]+-r[0-9]+$/, "", $1)
+ pkg = $1
+}
+/[0-9]+ (.iB|B)/ {
+ sub(/iB$/, "", $2)
+ printf "%d%c\t%s\n", $1, $2, pkg
+}
+' | sort -h