Complete fix datadir → pkgdatadir
This commit is contained in:
parent
daf29255f4
commit
88f9f46d81
@ -6,7 +6,7 @@ profiledir = $(sysconfdir)/profile.d
|
|||||||
profile_DATA = bash_completion.sh
|
profile_DATA = bash_completion.sh
|
||||||
|
|
||||||
bash_completion.sh: bash_completion.sh.in Makefile
|
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
|
CLEANFILES = bash_completion.sh
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ EXTRA_DIST = CHANGES $(sysconf_DATA) bash_completion.sh.in
|
|||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \
|
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|' \
|
-e 's|=/etc/bash_completion|=$(sysconfdir)/bash_completion|' \
|
||||||
$(DESTDIR)$(datadir)/bash_completion > $$tmpfile && \
|
$(DESTDIR)$(pkgdatadir)/bash_completion > $$tmpfile && \
|
||||||
mv $$tmpfile $(DESTDIR)$(datadir)/bash_completion
|
mv $$tmpfile $(DESTDIR)$(pkgdatadir)/bash_completion
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
# Check for recent enough version of bash.
|
# Check for recent enough version of bash.
|
||||||
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
|
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
|
||||||
if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then
|
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.
|
# Source completion code.
|
||||||
. @sysconfdir@/bash_completion
|
. @pkgdatadir@/bash_completion
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset bash bmajor bminor
|
unset bash bmajor bminor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user