summaryrefslogtreecommitdiffstats
path: root/host/dist/arch/getsize
diff options
context:
space:
mode:
authortv <tv@also>2011-08-04 16:42:02 +0200
committertv <tv@also>2011-08-04 16:42:02 +0200
commitfddac45f757b53f6d842257728ff0eb4758a40e6 (patch)
tree69d4ca9cb644b9cf38c1599c68be2a206e4adcd2 /host/dist/arch/getsize
parent53508a7f6719d11ba7c825757f2aff40617f9657 (diff)
host arch getsize: initial vomit
Diffstat (limited to 'host/dist/arch/getsize')
-rwxr-xr-xhost/dist/arch/getsize17
1 files changed, 17 insertions, 0 deletions
diff --git a/host/dist/arch/getsize b/host/dist/arch/getsize
new file mode 100755
index 00000000..d099c9e2
--- /dev/null
+++ b/host/dist/arch/getsize
@@ -0,0 +1,17 @@
+#! /bin/sh
+set -euf
+sed -rn '
+ /^Name/{
+ s/^Name *: *(.*)$/\1/
+ T
+ h
+ }
+ /^Installed Size/{
+ s/^Installed Size *: *(.*)$/ \1/
+ T
+ H
+ x
+ s/\n//g
+ p
+ }
+' | awk '{print$2$3" "$1}' | sort -n