xbps-src: replace basename(1) with ${var##*/}.
Reduce number of fork+exec due to using a subshell to execute basename(1).
This commit is contained in:
parent
ea9c012c04
commit
bcdacb66a0
20 changed files with 28 additions and 23 deletions
|
@ -6,7 +6,7 @@ update_hash_cache() {
|
|||
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)
|
||||
curfile="$(basename ${distfile})"
|
||||
curfile="${distfile##*/}"
|
||||
ln -vf "$distfile" "${cache}/${cksum}_${curfile}"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue