diff --git a/Makefile.am b/Makefile.am index 6db610bb..29546750 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ profiledir = $(sysconfdir)/profile.d profile_DATA = bash_completion.sh bash_completion.sh: bash_completion.sh.in Makefile - sed -e 's|@datadir[@]|$(datadir)|' <$(srcdir)/$@.in >$@ + sed -e 's|@pkgdatadir[@]|$(pkgdatadir)|' <$(srcdir)/$@.in >$@ CLEANFILES = bash_completion.sh @@ -14,7 +14,7 @@ EXTRA_DIST = CHANGES $(sysconf_DATA) bash_completion.sh.in install-data-hook: tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \ - sed -e 's|=/usr/share/bash-completion/|=$(datadir)/|' \ + sed -e 's|=/usr/share/bash-completion/|=$(pkgdatadir)/|' \ -e 's|=/etc/bash_completion|=$(sysconfdir)/bash_completion|' \ - $(DESTDIR)$(datadir)/bash_completion > $$tmpfile && \ - mv $$tmpfile $(DESTDIR)$(datadir)/bash_completion + $(DESTDIR)$(pkgdatadir)/bash_completion > $$tmpfile && \ + mv $$tmpfile $(DESTDIR)$(pkgdatadir)/bash_completion diff --git a/bash_completion.sh.in b/bash_completion.sh.in index 8d781a1f..a0ad4876 100644 --- a/bash_completion.sh.in +++ b/bash_completion.sh.in @@ -4,9 +4,9 @@ # Check for recent enough version of bash. bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then - if shopt -q progcomp && [ -r @sysconfdir@/bash_completion ]; then + if shopt -q progcomp && [ -r @pkgdatadir@/bash_completion ]; then # Source completion code. - . @sysconfdir@/bash_completion + . @pkgdatadir@/bash_completion fi fi unset bash bmajor bminor