forked from kiss-community/kiss
kiss-graph: new utility. Closes #197
This commit is contained in:
parent
9818c0866e
commit
8d50eea3b2
18
contrib/kiss-graph
Executable file
18
contrib/kiss-graph
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh -e
|
||||
# list all packages by size
|
||||
|
||||
cd "$KISS_ROOT/var/db/kiss/installed"
|
||||
|
||||
[ "$1" ] || set -- *
|
||||
|
||||
for pkg do
|
||||
sum=$(kiss size "$pkg" 2>&1 >/dev/null)
|
||||
num=${sum%%[A-Z][A-Z] *}
|
||||
|
||||
case ${sum%% *} in
|
||||
*MB) num=$((num * 1024)) ;;
|
||||
*GB) num=$((num * 1024 * 1024)) ;;
|
||||
esac
|
||||
|
||||
printf '%10s %s\n' "$num" "$pkg"
|
||||
done
|
Loading…
Reference in New Issue
Block a user