media-fonts/noto-emoji: add ~ppc64 keyword
[gentoo.git] / eclass / vcs-clean.eclass
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: vcs-clean.eclass
5 # @MAINTAINER:
6 # base-system@gentoo.org
7 # @AUTHOR:
8 # Benedikt Böhm <hollow@gentoo.org>
9 # @BLURB: helper functions to remove VCS directories
10
11 # @FUNCTION: ecvs_clean
12 # @USAGE: [list of dirs]
13 # @DESCRIPTION:
14 # Remove CVS directories and .cvs* files recursively.  Useful when a
15 # source tarball contains internal CVS directories.  Defaults to ${PWD}.
16 ecvs_clean() {
17         [[ $# -eq 0 ]] && set -- .
18         find "$@" '(' -type d -name 'CVS' -prune -o -type f -name '.cvs*' ')' \
19                 -exec rm -rf '{}' +
20 }
21
22 # @FUNCTION: esvn_clean
23 # @USAGE: [list of dirs]
24 # @DESCRIPTION:
25 # Remove .svn directories recursively.  Useful when a source tarball
26 # contains internal Subversion directories.  Defaults to ${PWD}.
27 esvn_clean() {
28         [[ $# -eq 0 ]] && set -- .
29         find "$@" -type d -name '.svn' -prune -exec rm -rf '{}' +
30 }
31
32 # @FUNCTION: egit_clean
33 # @USAGE: [list of dirs]
34 # @DESCRIPTION:
35 # Remove .git* directories recursively.  Useful when a source tarball
36 # contains internal Git directories.  Defaults to ${PWD}.
37 egit_clean() {
38         [[ $# -eq 0 ]] && set -- .
39         find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' +
40 }