mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-23 15:40:07 -07:00
b93e6b4ba8
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
19 lines
344 B
Bash
Executable File
19 lines
344 B
Bash
Executable File
#!/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
|