# 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.2 2004/10/26 22:54:07 ka0ttic Exp $ # # Simple eclass that provides an interface for installing # contributed (ie not included in bash-completion proper) # bash-completion scripts. # # Author: Aaron Walker # # Please assign any bug reports to shell-tools@gentoo.org. ECLASS="bash-completion" INHERITED="${INHERITED} ${ECLASS}" IUSE="${IUSE} bash-completion" RDEPEND="${RDEPEND} bash-completion? ( app-shells/bash-completion )" # dobashcompletion # First arg, , is required and is the location of the bash-completion # script to install. Second arg, , is optional and specifies an # alternate filename to install as. dobashcompletion() { [ -z "$1" ] && die "usage: dobashcompletion " if useq bash-completion ; then insinto /usr/share/bash-completion newins "$1" "${2:-${1##*/}}" fi }