From 56f34075aa214ca722ca6a8e6aed5fb306619e6f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 29 Jan 2016 17:54:50 -0500 Subject: [PATCH] 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. --- eclass/eutils.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 68c28138cce11..d23a5b7db8fe3 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 }