mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nix-prefetch-git: Support $NIX_PREFETCH_GIT_LEAVE_DOT_GIT.
svn path=/nixpkgs/trunk/; revision=18442
This commit is contained in:
parent
3124661215
commit
39476057a2
@ -44,7 +44,11 @@ if test -z "$finalPath"; then
|
|||||||
fi
|
fi
|
||||||
# Allow doing additional processing before .git removal
|
# Allow doing additional processing before .git removal
|
||||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
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.
|
# Compute the hash.
|
||||||
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
|
hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
|
||||||
|
Loading…
Reference in New Issue
Block a user