diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-18 16:39:06 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-18 16:39:06 +0000 |
commit | 39476057a2a6566103029d37929c6bcb32d96605 (patch) | |
tree | ccf6221f44e8cd315b85f6f434d9b2759bae5122 /pkgs/build-support/fetchgit | |
parent | 3124661215a4971993bcb5c98297b55c62eeb3ff (diff) | |
download | nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar.gz nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar.bz2 nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar.lz nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar.xz nixlib-39476057a2a6566103029d37929c6bcb32d96605.tar.zst nixlib-39476057a2a6566103029d37929c6bcb32d96605.zip |
nix-prefetch-git: Support $NIX_PREFETCH_GIT_LEAVE_DOT_GIT.
svn path=/nixpkgs/trunk/; revision=18442
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 88d2421003bc..3983ab28a2c7 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -44,7 +44,11 @@ if test -z "$finalPath"; then fi # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" - find $tmpFile -name .git\* | xargs rm -rf + if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1 + then + echo "removing \`.git'..." + rm -rf .git + fi # Compute the hash. hash=$(nix-hash --type $hashType $hashFormat $tmpFile) |