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
|
@ -75,7 +75,7 @@ purge_distfiles() {
|
|||
hashes=($XBPS_SRCDISTDIR/by_sha256/*)
|
||||
readonly HASHLEN=64
|
||||
for file in ${hashes[@]}; do
|
||||
hash_distfile=$(basename "$file")
|
||||
hash_distfile=${file##*/}
|
||||
hash=${hash_distfile:0:$HASHLEN}
|
||||
[ -n "${my_hashes[$hash]}" ] && continue
|
||||
inode=$(stat "$file" --printf "%i")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue