bad20b1e3836abab7b143a78f31d33a075c588ca
[platform/upstream/elfutils.git] / config / profile.sh.in
1 # $HOME/.profile* or similar files may first set $DEBUGINFOD_URLS.
2 # If $DEBUGINFOD_URLS is not set there, we set it from system *.url files.
3 # $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS.
4 # See also [man debuginfod-client-config] for other environment variables
5 # such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS.
6
7 if [ -z "$DEBUGINFOD_URLS" ]; then
8     prefix="@prefix@"
9     DEBUGINFOD_URLS=$(cat "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ')
10     [ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS
11     unset prefix
12 fi