Skip to content

Commit

Permalink
eutils.eclass: e{cvs,svn,git}_clean: make empty arg testing more correct
Browse files Browse the repository at this point in the history
-z $* tests whether any args are non-empty, not whether any where
specified.  Check $# instead for accurate results.
  • Loading branch information
vapier committed Jan 29, 2016
1 parent cae0c8e commit 56f3407
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eclass/eutils.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 56f3407

Please sign in to comment.