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 <marocketbd@gmail.com>
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