diff options
author | Aaron Walker <ka0ttic@gentoo.org> | 2004-10-26 22:28:22 +0000 |
---|---|---|
committer | Aaron Walker <ka0ttic@gentoo.org> | 2004-10-26 22:28:22 +0000 |
commit | 4f5ec2b45933d88fd0b95d6210df26db10f80f81 (patch) | |
tree | de637f23573e12cd477394571f9a0583f0602947 /eclass/bash-completion.eclass | |
parent | ~amd64 closes bug 68048 (diff) | |
download | historical-4f5ec2b45933d88fd0b95d6210df26db10f80f81.tar.gz historical-4f5ec2b45933d88fd0b95d6210df26db10f80f81.tar.bz2 historical-4f5ec2b45933d88fd0b95d6210df26db10f80f81.zip |
Initial commit.
Diffstat (limited to 'eclass/bash-completion.eclass')
-rw-r--r-- | eclass/bash-completion.eclass | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/eclass/bash-completion.eclass b/eclass/bash-completion.eclass new file mode 100644 index 000000000000..3b1ca99d04db --- /dev/null +++ b/eclass/bash-completion.eclass @@ -0,0 +1,30 @@ +# 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.1 2004/10/26 22:28:22 ka0ttic Exp $ +# +# Simple eclass that provides an interface for installing +# contributed (ie not included in bash-completion proper) +# bash-completion scripts. +# +# Author: Aaron Walker <ka0ttic@gentoo.org> +# +# Please assign any bug reports to shell-tools@gentoo.org. + +ECLASS="bash-completion" +INHERITED="${INHERITED} ${ECLASS}" + +IUSE="${IUSE} bash-completion" +RDEPEND="bash-completion? ( app-shells/bash-completion )" + +# 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 +# alternate filename to install as. + +dobashcompletion() { + [ -z "$1" ] && die "usage: dobashcompletion <file> <new file>" + if useq bash-completion ; then + insinto /usr/share/bash-completion + newins "$1" "${2:-${1##*/}}" + fi +} |