substitute path to bash_completion time in profile script according to actual installation path
This commit is contained in:
parent
1691618a65
commit
dd30aa427c
@ -155,5 +155,10 @@ bashcomp_DATA = contrib/abook \
|
|||||||
profiledir = $(sysconfdir)/profile.d
|
profiledir = $(sysconfdir)/profile.d
|
||||||
profile_DATA = bash_completion.sh
|
profile_DATA = bash_completion.sh
|
||||||
|
|
||||||
EXTRA_DIST = CHANGES $(sysconf_DATA) $(bashcomp_DATA) $(profile_DATA) \
|
bash_completion.sh: bash_completion.sh.in Makefile
|
||||||
|
sed -e 's|@sysconfdir[@]|$(sysconfdir)|' <$(srcdir)/$@.in >$@
|
||||||
|
|
||||||
|
CLEANFILES = bash_completion.sh
|
||||||
|
|
||||||
|
EXTRA_DIST = CHANGES $(sysconf_DATA) $(bashcomp_DATA) bash_completion.sh.in \
|
||||||
contrib/_modules contrib/_subversion contrib/_yum contrib/_yum-utils
|
contrib/_modules contrib/_subversion contrib/_yum contrib/_yum-utils
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
|
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
|
||||||
if [ $bmajor -ge 3 -a -r /etc/bash_completion ]; then
|
if [ $bmajor -ge 3 -a -r /etc/bash_completion ]; then
|
||||||
# Source completion code.
|
# Source completion code.
|
||||||
. /etc/bash_completion
|
. /usr/local/etc/bash_completion
|
||||||
fi
|
fi
|
||||||
unset bash bmajor
|
unset bash bmajor
|
||||||
|
10
bash_completion.sh.in
Normal file
10
bash_completion.sh.in
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Check for interactive bash and that we haven't already been sourced.
|
||||||
|
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
|
||||||
|
|
||||||
|
# Check for recent enough version of bash.
|
||||||
|
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
|
||||||
|
if [ $bmajor -ge 3 -a -r /etc/bash_completion ]; then
|
||||||
|
# Source completion code.
|
||||||
|
. @sysconfdir@/bash_completion
|
||||||
|
fi
|
||||||
|
unset bash bmajor
|
Loading…
x
Reference in New Issue
Block a user