diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-29 17:54:50 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-29 17:54:50 -0500 |
commit | 56f34075aa214ca722ca6a8e6aed5fb306619e6f (patch) | |
tree | 27825640208a607cf34af974605dd172794ed450 /eclass/eutils.eclass | |
parent | sci-visualization/gnuplot: fix cross-compile builds (diff) | |
download | gentoo-56f34075aa214ca722ca6a8e6aed5fb306619e6f.tar.gz gentoo-56f34075aa214ca722ca6a8e6aed5fb306619e6f.tar.bz2 gentoo-56f34075aa214ca722ca6a8e6aed5fb306619e6f.zip |
eutils.eclass: e{cvs,svn,git}_clean: make empty arg testing more correct
-z $* tests whether any args are non-empty, not whether any where
specified. Check $# instead for accurate results.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 68c28138cce1..d23a5b7db8fe 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -39,7 +39,7 @@ fi # Remove CVS directories recursiveley. Useful when a source tarball contains # internal CVS directories. Defaults to $PWD. ecvs_clean() { - [[ -z $* ]] && set -- . + [[ $# -eq 0 ]] && set -- . find "$@" -type d -name 'CVS' -prune -print0 | xargs -0 rm -rf find "$@" -type f -name '.cvs*' -print0 | xargs -0 rm -rf } @@ -50,7 +50,7 @@ ecvs_clean() { # Remove .svn directories recursiveley. Useful when a source tarball contains # internal Subversion directories. Defaults to $PWD. esvn_clean() { - [[ -z $* ]] && set -- . + [[ $# -eq 0 ]] && set -- . find "$@" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf } @@ -60,7 +60,7 @@ esvn_clean() { # Remove .git* directories/files recursiveley. Useful when a source tarball # contains internal Git directories. Defaults to $PWD. egit_clean() { - [[ -z $* ]] && set -- . + [[ $# -eq 0 ]] && set -- . find "$@" -type d -name '.git*' -prune -print0 | xargs -0 rm -rf } |