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

Contents of /eclass/bash-completion-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Thu Sep 8 20:28:29 2011 UTC (2 years, 10 months ago) by mgorny
Branch: MAIN
Changes since 1.1: +6 -1 lines
Add EAPI check (just to be sure).

1 mgorny 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.2 # $Header: /var/cvsroot/gentoo-x86/eclass/bash-completion-r1.eclass,v 1.1 2011/09/08 16:25:54 mgorny Exp $
4 mgorny 1.1
5     # @ECLASS: bash-completion-r1.eclass
6     # @MAINTAINER:
7     # mgorny@gentoo.org
8     # @BLURB: A few quick functions to install bash-completion files
9     # @EXAMPLE:
10     #
11     # @CODE
12     # EAPI=4
13     #
14     # src_install() {
15     # default
16     #
17     # newbashcomp contrib/${PN}.bash-completion ${PN}
18     # }
19     # @CODE
20    
21 mgorny 1.2 case ${EAPI:-0} in
22     0|1|2|3|4) ;;
23     *) die "EAPI ${EAPI} unsupported (yet)."
24     esac
25    
26 mgorny 1.1 # @FUNCTION: dobashcomp
27     # @USAGE: file [...]
28     # @DESCRIPTION:
29     # Install bash-completion files passed as args. Has EAPI-dependant failure
30     # behavior (like doins).
31     dobashcomp() {
32     debug-print-function ${FUNCNAME} "${@}"
33    
34     (
35     insinto /usr/share/bash-completion
36     doins "${@}"
37     )
38     }
39    
40     # @FUNCTION: newbashcomp
41     # @USAGE: file newname
42     # @DESCRIPTION:
43     # Install bash-completion file under a new name. Has EAPI-dependant failure
44     # behavior (like newins).
45     newbashcomp() {
46     debug-print-function ${FUNCNAME} "${@}"
47    
48     (
49     insinto /usr/share/bash-completion
50     newins "${@}"
51     )
52     }

  ViewVC Help
Powered by ViewVC 1.1.20