diff options
author | Tim Cuthbertson <tim@gfxmonk.net> | 2015-12-13 11:27:03 +1100 |
---|---|---|
committer | Tim Cuthbertson <tim@gfxmonk.net> | 2016-02-27 16:56:38 +1100 |
commit | 456cbb29d9ba0cd518e82d2c2dc68e665629595e (patch) | |
tree | 818aa90c52e6eb7be874daf541c6a7cecd1f14bb /pkgs/build-support/fetchgit | |
parent | 96425dfa09a7a5ec4556a4a23102c481c72f5a4e (diff) |
nix-prefetch-git: add --quiet flag and minor cleanup
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 97096aa29806d..f81b896e33b02 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -52,6 +52,7 @@ for arg; do --hash) argfun=set_hashType;; --branch-name) argfun=set_branchName;; --deepClone) deepClone=true;; + --quiet) QUIET=true;; --no-deepClone) deepClone=false;; --leave-dotGit) leaveDotGit=true;; --fetch-submodules) fetchSubmodules=true;; @@ -281,9 +282,9 @@ clone_user_rev() { eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" if test -z "$leaveDotGit"; then echo "removing \`.git'..." >&2 - find $dir -name .git\* | xargs rm -rf + find "$dir" -name .git\* -print0 | xargs -0 rm -rf else - find $dir -name .git | while read gitdir; do + find "$dir" -name .git | while read gitdir; do make_deterministic_repo "$(readlink -f "$gitdir/..")" done fi |