cpt

Carbs Packaging Tools
git clone git://git.carbslinux.org/cpt
Log | Files | Refs | README | LICENSE

commit 7c82ce315592ef923f9e69070c68c54641daf28a
parent 656930922e6fce760242cfbd1d50532659994100
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 20 Oct 2020 14:33:13 +0300

cpt-size: add ability to check the size of multiple packages

Diffstat:
Mcontrib/cpt-size | 18++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/contrib/cpt-size b/contrib/cpt-size @@ -3,21 +3,23 @@ case "$1" in --help|-h) - printf '%s\n' "usage: ${0##*/} [pkg]" + printf '%s\n' "usage: ${0##*/} [pkg...]" exit 0 ;; '') set -- "${PWD##*/}" esac -cpt-search "$1" >/dev/null +for pkg; do cpt-list "$pkg" >/dev/null; done files= -while read -r file; do - # Filter directories from manifest and leave only files. - # Directories in the manifest end in a trailing '/'. - case $file in */) continue; esac - files="$files '$file'" -done < "$CPT_ROOT/var/db/cpt/installed/$1/manifest" +for pkg; do + while read -r file; do + # Filter directories from manifest and leave only files. + # Directories in the manifest end in a trailing '/'. + case $file in */) continue; esac + files="$files '$file'" + done < "$CPT_ROOT/var/db/cpt/installed/$pkg/manifest" +done eval "set -- $files" # Send the file list to 'du'.