diff options
Diffstat (limited to 'tools/compute-rpm-sizes.sh')
-rwxr-xr-x | tools/compute-rpm-sizes.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/compute-rpm-sizes.sh b/tools/compute-rpm-sizes.sh new file mode 100755 index 0000000..5425d3f --- /dev/null +++ b/tools/compute-rpm-sizes.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +chroot=$1 +name=$2 + +if [ -z "$chroot" ] || [ -z "$name" ]; then + echo "usage: $0 <chroot> <name>" +fi + +full=$name-full.lst +leaves=$name-leaves.lst +chroot $chroot sh -c "rpm -qa --qf '%{size} \t%{name}\n' | sort -n" > $full +chroot $chroot sh -c "urpmi_rpm-find-leaves | xargs rpm -q --qf '%{size} \t%{name}\n' | sort -n" > $leaves + +echo $full $leaves |