diff options
Diffstat (limited to 'contrib/cpt-size')
-rwxr-xr-x | contrib/cpt-size | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/cpt-size b/contrib/cpt-size index f55f72a..0e7b9d6 100755 --- 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'. |