set +u workaround for empty arrays
libDirs can be empty, which in combination with "set -u" of
9f1e009975
will cause a variable unbound
error on old bash versions
This commit is contained in:
parent
5baea8f0eb
commit
ad8d5649a2
|
@ -121,7 +121,7 @@ if [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ]; then
|
||||||
# It's important to add the rpath in the order of -L..., so
|
# It's important to add the rpath in the order of -L..., so
|
||||||
# the link time chosen objects will be those of runtime linking.
|
# the link time chosen objects will be those of runtime linking.
|
||||||
declare -A rpaths
|
declare -A rpaths
|
||||||
for dir in "${libDirs[@]}"; do
|
for dir in ${libDirs+"${libDirs[@]}"}; do
|
||||||
if [[ "$dir" =~ [/.][/.] ]] && dir2=$(readlink -f "$dir"); then
|
if [[ "$dir" =~ [/.][/.] ]] && dir2=$(readlink -f "$dir"); then
|
||||||
dir="$dir2"
|
dir="$dir2"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue