update_hash_cache.sh: avoid useless use of cat

This commit is contained in:
maxice8 2019-04-13 13:41:00 -03:00 committed by maxice8
parent 2aa48601af
commit 8fff9cee19
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ update_hash_cache() {
local distfile curfile
mkdir -p "$cache"
find "$XBPS_SRCDISTDIR" -type f | grep -v by_sha256 | while read -r distfile; do
cksum=$(cat "$distfile" | sha256sum | cut -d " " -f 1)
cksum=$($XBPS_DIGEST_CMD "$distfile")
curfile="${distfile##*/}"
ln -vf "$distfile" "${cache}/${cksum}_${curfile}"
done