Complete fix datadir → pkgdatadir

master
David Paleino 2011-05-02 18:56:14 +02:00
parent daf29255f4
commit 88f9f46d81
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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