summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2004-12-30 00:18:25 +0000
committerAaron Walker <ka0ttic@gentoo.org>2004-12-30 00:18:25 +0000
commit202e0e5b37a757e563738934ddb3c1419db970e8 (patch)
tree274546e9e07c2866e108f4fb0a1a96c934162168
parentStable on mips, bug #59361 (diff)
downloadhistorical-202e0e5b37a757e563738934ddb3c1419db970e8.tar.gz
historical-202e0e5b37a757e563738934ddb3c1419db970e8.tar.bz2
historical-202e0e5b37a757e563738934ddb3c1419db970e8.zip
Remove global BASH_COMPLETION_NAME var
-rw-r--r--eclass/bash-completion.eclass8
1 files changed, 3 insertions, 5 deletions
diff --git a/eclass/bash-completion.eclass b/eclass/bash-completion.eclass
index a7ab5914bb81..84af38b8a6d0 100644
--- a/eclass/bash-completion.eclass
+++ b/eclass/bash-completion.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.6 2004/12/29 10:26:33 ka0ttic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.7 2004/12/30 00:18:25 ka0ttic Exp $
#
# Simple eclass that provides an interface for installing
# contributed (ie not included in bash-completion proper)
@@ -19,9 +19,6 @@ IUSE="${IUSE} bash-completion"
#RDEPEND="${RDEPEND}
# bash-completion? ( app-shells/bash-completion-config )"
-##### VARIABLES #####
-[[ -z "${BASH_COMPLETION_NAME}" ]] && BASH_COMPLETION_NAME="${PN}"
-
# dobashcompletion <file> <new file>
# First arg, <file>, is required and is the location of the bash-completion
# script to install. Second arg, <new file>, is optional and specifies an
@@ -29,7 +26,8 @@ IUSE="${IUSE} bash-completion"
dobashcompletion() {
[[ -z "$1" ]] && die "usage: dobashcompletion <file> <new file>"
- [[ -n "$2" ]] && export BASH_COMPLETION_NAME="$2"
+ [[ -z "${BASH_COMPLETION_NAME}" ]] && BASH_COMPLETION_NAME="${2:-${PN}}"
+
if useq bash-completion ; then
insinto /usr/share/bash-completion
newins "$1" "${BASH_COMPLETION_NAME}" || die "Failed to install $1"