Shell: dramatically increased performance and simplicity of pacman-files.
parent
12700c1dea
commit
4c2bea8bcb
|
@ -46,7 +46,7 @@ pacman-files()
|
|||
echo -e " $1 [-n] PACKAGES"
|
||||
echo
|
||||
echo "Usage:"
|
||||
echo -e " default:\tDisplay file size of PACKAGES."
|
||||
echo -e " default:\tDisplay size of files in PACKAGES."
|
||||
echo -e " -h:\t\tDisplay this help."
|
||||
echo -e " -n:\t\tSort by size."
|
||||
}
|
||||
|
@ -82,11 +82,7 @@ pacman-files()
|
|||
return 1
|
||||
fi
|
||||
|
||||
local RESULT_HUMAN="$(du -bh $(pacman -Qlq "$@" | grep -v ".*/$" | sort -u) | eval ${OPTION_SORT})"
|
||||
local RESULT="$(du -b $(pacman -Qlq "$@" | grep -v ".*/$" | sort -u))"
|
||||
echo "${RESULT_HUMAN}"
|
||||
|
||||
echo "$RESULT" | awk -F "[[:alpha:]]" '{TOTAL=$1+TOTAL} END {printf("Total: %d KiB\n",TOTAL/1024)}'
|
||||
du -bch $(pacman -Qlq "$@" | grep -v ".*/$" | sort -u) 2>/dev/null | eval ${OPTION_SORT}
|
||||
}
|
||||
|
||||
## Retrieve official packages list.
|
||||
|
|
Loading…
Reference in New Issue