/[gentoo-x86]/eclass/bash-completion.eclass
Gentoo

Contents of /eclass/bash-completion.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sun Oct 31 12:59:10 2004 UTC (9 years, 11 months ago) by ka0ttic
Branch: MAIN
Changes since 1.3: +2 -2 lines
die if newins fails

1 ka0ttic 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ka0ttic 1.4 # $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion.eclass,v 1.3 2004/10/30 23:13:44 ka0ttic Exp $
4 ka0ttic 1.1 #
5     # Simple eclass that provides an interface for installing
6     # contributed (ie not included in bash-completion proper)
7     # bash-completion scripts.
8     #
9     # Author: Aaron Walker <ka0ttic@gentoo.org>
10     #
11     # Please assign any bug reports to shell-tools@gentoo.org.
12    
13     ECLASS="bash-completion"
14     INHERITED="${INHERITED} ${ECLASS}"
15    
16     IUSE="${IUSE} bash-completion"
17 ka0ttic 1.3
18     #RDEPEND="${RDEPEND}
19     # bash-completion? ( app-shells/bash-completion )"
20 ka0ttic 1.1
21     # dobashcompletion <file> <new file>
22     # First arg, <file>, is required and is the location of the bash-completion
23     # script to install. Second arg, <new file>, is optional and specifies an
24     # alternate filename to install as.
25    
26     dobashcompletion() {
27     [ -z "$1" ] && die "usage: dobashcompletion <file> <new file>"
28     if useq bash-completion ; then
29     insinto /usr/share/bash-completion
30 ka0ttic 1.4 newins "$1" "${2:-${1##*/}}" || die "Failed to install $1"
31 ka0ttic 1.1 fi
32     }

  ViewVC Help
Powered by ViewVC 1.1.20