setup-hooks: do not pass missing dirs to find (close #15405)
find fails when called with an inexistent search path. That situation may arise when the output is created after by a postFixup hook. vcunat amended the PR by clarifying one more `return` to `return 0`.
This commit is contained in:
parent
70cecb9cbd
commit
bfd522da63
@ -6,8 +6,10 @@ dontStrip=1
|
||||
fixupOutputHooks+=(_separateDebugInfo)
|
||||
|
||||
_separateDebugInfo() {
|
||||
[ -e "$prefix" ] || return 0
|
||||
|
||||
local dst="${debug:-$out}"
|
||||
if [ "$prefix" = "$dst" ]; then return; fi
|
||||
if [ "$prefix" = "$dst" ]; then return 0; fi
|
||||
|
||||
dst="$dst/lib/debug/.build-id"
|
||||
|
||||
|
@ -6,6 +6,8 @@ fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi')
|
||||
|
||||
patchELF() {
|
||||
local dir="$1"
|
||||
[ -e "$dir" ] || return 0
|
||||
|
||||
header "shrinking RPATHs of ELF executables and libraries in $dir"
|
||||
|
||||
local i
|
||||
|
Loading…
Reference in New Issue
Block a user