Fish does not support bracketed variables in scripts. Remove brackets
from the variable ${prefix} in profile.fish before installation to
prevent this error.
Fish also raises an error for unmatched wildcards, except for special
cases like the set command. Use a wildcard to match .urls files using
the set command instead of cat to prevent an unmatched wildcard error
when no .urls files are found.
Signed-off-by: Aaron Merey <amerey@redhat.com>
install-data-local:
$(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
$(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ sed -i 's/{prefix}/prefix/g' profile.fish
$(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish
mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod
if [ -n "@DEBUGINFOD_URLS@" ]; then \
if not set --query DEBUGINFOD_URLS
# Use local variables so we don't need to manually unset them
set --local prefix "@prefix@"
- set --local DEBUGINFOD_URLS (cat /dev/null "@sysconfdir@/debuginfod"/*.urls 2>/dev/null | string replace '\n' ' ')
+ set --local files "@sysconfdir@/debuginfod/"*.urls
+ set --local DEBUGINFOD_URLS (cat /dev/null $files 2>/dev/null | string replace '\n' ' ')
if test -n "$DEBUGINFOD_URLS"
set --global --export DEBUGINFOD_URLS "$DEBUGINFOD_URLS"
end
set -o pipefail
source ${abs_top_builddir}/config/profile.sh
+
+type fish 2>/dev/null || (echo "no fish installed"; exit 77)
+fish ${abs_top_builddir}/config/profile.fish