diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-06-13 16:23:56 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-06-13 16:23:56 +0000 |
commit | 8f09041ed5b7efa6a961bae0ff443ba4c47f0e60 (patch) | |
tree | 55bab04f65e02b64fba42022a1986fb0586bc876 /eclass | |
parent | Adding myself to maintainers, version bump (bash4-only version) (diff) | |
download | gentoo-2-8f09041ed5b7efa6a961bae0ff443ba4c47f0e60.tar.gz gentoo-2-8f09041ed5b7efa6a961bae0ff443ba4c47f0e60.tar.bz2 gentoo-2-8f09041ed5b7efa6a961bae0ff443ba4c47f0e60.zip |
Introduce get_bashcompdir(), wrt bug #469858.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/bash-completion-r1.eclass | 27 |
2 files changed, 27 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 69e2147f5046..6babd01d10fb 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.855 2013/06/11 09:25:45 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.856 2013/06/13 16:23:56 mgorny Exp $ + + 13 Jun 2013; Michał Górny <mgorny@gentoo.org> bash-completion-r1.eclass: + Introduce get_bashcompdir(), wrt bug #469858. 11 Jun 2013; Tim Harder <radhermit@gentoo.org> vim.eclass: Remove old VIMRUNTIME warning. diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass index 8af46ee16033..31a83f01e145 100644 --- a/eclass/bash-completion-r1.eclass +++ b/eclass/bash-completion-r1.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.3 2012/09/27 16:35:41 axs Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.4 2013/06/13 16:23:56 mgorny Exp $ # @ECLASS: bash-completion-r1.eclass # @MAINTAINER: @@ -23,6 +23,25 @@ case ${EAPI:-0} in *) die "EAPI ${EAPI} unsupported (yet)." esac +# @FUNCTION: _bash-completion-r1_get_bashcompdir +# @INTERNAL +# @DESCRIPTION: +# Get unprefixed bash-completion directory. +_bash-completion-r1_get_bashcompdir() { + debug-print-function ${FUNCNAME} "${@}" + + echo /usr/share/bash-completion +} + +# @FUNCTION: get_bashcompdir +# @DESCRIPTION: +# Get the bash-completion directory. +get_bashcompdir() { + debug-print-function ${FUNCNAME} "${@}" + + echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)" +} + # @FUNCTION: dobashcomp # @USAGE: file [...] # @DESCRIPTION: @@ -32,7 +51,7 @@ dobashcomp() { debug-print-function ${FUNCNAME} "${@}" ( - insinto /usr/share/bash-completion + insinto "$(_bash-completion-r1_get_bashcompdir)" doins "${@}" ) } @@ -46,7 +65,7 @@ newbashcomp() { debug-print-function ${FUNCNAME} "${@}" ( - insinto /usr/share/bash-completion + insinto "$(_bash-completion-r1_get_bashcompdir)" newins "${@}" ) } |