summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2018-02-16 07:47:46 +0100
committerUlrich Müller <ulm@gentoo.org>2018-03-02 09:33:23 +0100
commit437fa331a8d9ed4259949e3731b2eab330b69f2a (patch)
treedd290073d0a089fb68a3579f8ae70dbce94636d4 /eclass/eutils.eclass
parentapp-arch/brotli: Tested on ~amd64-fbsd (diff)
downloadgentoo-437fa331a8d9ed4259949e3731b2eab330b69f2a.tar.gz
gentoo-437fa331a8d9ed4259949e3731b2eab330b69f2a.tar.bz2
gentoo-437fa331a8d9ed4259949e3731b2eab330b69f2a.zip
eutils.eclass: More reliable return status for e*_clean functions.
In ecvs_clean, combine the two find commands into one, so that the exit status of the first one won't be ignored. Also use find -exec rather then find | xargs, so we don't have to check the exit status of all commands in the pipeline.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 8bbd561015ad..0a5bf3853582 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -44,8 +44,8 @@ fi
# internal CVS directories. Defaults to $PWD.
ecvs_clean() {
[[ $# -eq 0 ]] && set -- .
- find "$@" -type d -name 'CVS' -prune -print0 | xargs -0 rm -rf
- find "$@" -type f -name '.cvs*' -print0 | xargs -0 rm -rf
+ find "$@" '(' -type d -name 'CVS' -prune -o -type f -name '.cvs*' ')' \
+ -exec rm -rf '{}' +
}
# @FUNCTION: esvn_clean
@@ -55,7 +55,7 @@ ecvs_clean() {
# internal Subversion directories. Defaults to $PWD.
esvn_clean() {
[[ $# -eq 0 ]] && set -- .
- find "$@" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf
+ find "$@" -type d -name '.svn' -prune -exec rm -rf '{}' +
}
# @FUNCTION: egit_clean
@@ -65,7 +65,7 @@ esvn_clean() {
# contains internal Git directories. Defaults to $PWD.
egit_clean() {
[[ $# -eq 0 ]] && set -- .
- find "$@" -type d -name '.git*' -prune -print0 | xargs -0 rm -rf
+ find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' +
}
# @FUNCTION: emktemp