mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 21:39:03 +02:00
vendor.sh: optimise find_me()
i'm adding characters to 7ztest, which isn't being passed on through because everything runs in subshells; the next pass would default back to the original string, so a given file may be checked multiple times. fix this by mitigation; use the random string from mktemp as a suffix instead. in practice, this has not affected performance much, but it will nevertheless avoid unnecessary work by xbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -181,7 +181,7 @@ pybin()
|
||||
[ $venv -gt 0 ] && for pypath in "/usr/local/bin" "/usr/bin"; do
|
||||
[ -e "$pypath/$1" ] && [ ! -d "$pypath/$1" ] && \
|
||||
[ -x "$pypath/$1" ] && printf "%s/%s\n" "$pypath" "$1" && \
|
||||
return 0
|
||||
return 0; :
|
||||
done && return 1
|
||||
|
||||
# Defer to normal command -v if not a venv
|
||||
|
||||
Reference in New Issue
Block a user