diff options
-rw-r--r-- | config/ChangeLog | 7 | ||||
-rw-r--r-- | config/profile.csh.in | 10 | ||||
-rw-r--r-- | config/profile.sh.in | 9 |
3 files changed, 14 insertions, 12 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index d2d61c6c..b9b1c44e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,10 @@ +2022-01-19 Ahelenia ZiemiaĆska <nabijaczleweli@nabijaczleweli.xyz> + + * profile.csh.in: Set DEBUGINFOD_URLS directly. Use "$0" and : + in sh -c. + * profile.sh.in: Set DEBUGINFOD_URLS directly. Don't use sh -c. + Use $() instead of ``. + 2022-04-07 Mark Wielaard <mark@klomp.org> * elfutils.spec.in (debuginfod-client): Add an explicit requires diff --git a/config/profile.csh.in b/config/profile.csh.in index 01f7c2f2..012e243a 100644 --- a/config/profile.csh.in +++ b/config/profile.csh.in @@ -1,4 +1,3 @@ - # $HOME/.login* or similar files may first set $DEBUGINFOD_URLS. # If $DEBUGINFOD_URLS is not set there, we set it from system *.url files. # $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS. @@ -7,10 +6,11 @@ if (! $?DEBUGINFOD_URLS) then set prefix="@prefix@" - set debuginfod_urls=`sh -c "cat @sysconfdir@/debuginfod/*.urls 2>/dev/null" | tr '\n' ' '` - if ( "$debuginfod_urls" != "" ) then - setenv DEBUGINFOD_URLS "$debuginfod_urls" + set DEBUGINFOD_URLS=`sh -c 'cat "$0"/*.urls; :' "@sysconfdir@/debuginfod" 2>/dev/null | tr '\n' ' '` + if ( "$DEBUGINFOD_URLS" != "" ) then + setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS" + else + unset DEBUGINFOD_URLS endif - unset debuginfod_urls unset prefix endif diff --git a/config/profile.sh.in b/config/profile.sh.in index afce3963..bad20b1e 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -1,4 +1,3 @@ - # $HOME/.profile* or similar files may first set $DEBUGINFOD_URLS. # If $DEBUGINFOD_URLS is not set there, we set it from system *.url files. # $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS. @@ -7,11 +6,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then prefix="@prefix@" - debuginfod_urls=`sh -c "cat @sysconfdir@/debuginfod/*.urls 2>/dev/null" | tr '\n' ' '` - if [ -n "$debuginfod_urls" ]; then - DEBUGINFOD_URLS="$debuginfod_urls" - export DEBUGINFOD_URLS - fi - unset debuginfod_urls + DEBUGINFOD_URLS=$(cat "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ') + [ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset DEBUGINFOD_URLS unset prefix fi |