substitute path to bash_completion time in profile script according to actual installation path
parent
1691618a65
commit
dd30aa427c
|
@ -155,5 +155,10 @@ bashcomp_DATA = contrib/abook \
|
|||
profiledir = $(sysconfdir)/profile.d
|
||||
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
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}
|
||||
if [ $bmajor -ge 3 -a -r /etc/bash_completion ]; then
|
||||
# Source completion code.
|
||||
. /etc/bash_completion
|
||||
. /usr/local/etc/bash_completion
|
||||
fi
|
||||
unset bash bmajor
|
||||
|
|
|
@ -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…
Reference in New Issue