Merge branch 'master' of github.com:kisslinux/kiss

This commit is contained in:
Dylan Araps 2021-08-05 06:38:14 +03:00
commit 84fb22213d
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

View File

@ -27,14 +27,11 @@ kiss list "${1:-null}" >/dev/null || {
# Filter directories from manifest and leave only files. # Filter directories from manifest and leave only files.
# Directories in the manifest end in a trailing '/'. # Directories in the manifest end in a trailing '/'.
files=$(sed -e "s|^|$KISS_ROOT|" -e 's|.*/$||' \ # Send the file list to 'xargs' to run through 'du',
"$KISS_ROOT/var/db/kiss/installed/$1/manifest") # this prevents du from exiting due to too many arguments
sed -e "s|^|$KISS_ROOT|" -e 's|.*/$||' \
# Send the file list to 'du'. "$KISS_ROOT/var/db/kiss/installed/$1/manifest" \
# This unquoted variable is safe as word splitting is intended | xargs du -sk -- 2>/dev/null |
# and globbing is globally disabled in this script.
# shellcheck disable=2086
du -sk -- $files 2>/dev/null |
# Iterate over each line and convert the byte output to human # Iterate over each line and convert the byte output to human
# readable (MB, KB, GB, etc). # readable (MB, KB, GB, etc).