From: RocketDev Date: Sat, 26 Oct 2024 14:18:09 +0000 (+0800) Subject: config: fix globing error for zsh X-Git-Tag: elfutils-0.193~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00cb3efe36337f27925dbff9b2e7d97c7df95bf8;p=thirdparty%2Felfutils.git config: fix globing error for zsh Zsh treat unmatched glob as error while bash treat that as the original string. Substitute globing with find to solve. * config/profile.sh.in: Fix globing error for zsh Signed-off-by: RocketDev --- diff --git a/config/profile.sh.in b/config/profile.sh.in index 5e86f433..9f3e415a 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -6,12 +6,12 @@ prefix="@prefix@" if [ -z "$DEBUGINFOD_URLS" ]; then - DEBUGINFOD_URLS=$(cat /dev/null "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ' || :) + DEBUGINFOD_URLS=$(find "@sysconfdir@/debuginfod" -name "*.urls" -print0 2>/dev/null | xargs -0 cat 2>/dev/null | tr '\n' ' ' || :) [ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS fi if [ -z "$DEBUGINFOD_IMA_CERT_PATH" ]; then - DEBUGINFOD_IMA_CERT_PATH=$(cat /dev/null "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :) + DEBUGINFOD_IMA_CERT_PATH=$(find "@sysconfdir@/debuginfod" -name "*.certpath" -print0 2>/dev/null | xargs -0 cat 2>/dev/null | tr '\n' ':' || :) [ -n "$DEBUGINFOD_IMA_CERT_PATH" ] && export DEBUGINFOD_IMA_CERT_PATH || unset DEBUGINFOD_IMA_CERT_PATH fi unset prefix