From 6eb609420cdfe8ca08134a35ddfc72bb438433b1 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Aug 2011 16:42:02 +0200 Subject: host arch getsize: initial vomit --- host/dist/arch/getsize | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 host/dist/arch/getsize (limited to 'host/dist/arch/getsize') 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 -- cgit v1.2.3