From 69421194a5b578c6bb3ff251e7ef2fc63d7ac175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 3 Dec 2009 15:01:54 +0000 Subject: [PATCH] nix-prefetch-svn: Support $NIX_PREFETCH_SVN_LEAVE_DOT_SVN. svn path=/nixpkgs/trunk/; revision=18789 --- pkgs/build-support/fetchsvn/nix-prefetch-svn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn index b9d10fea21ca..2858a0b01ab1 100755 --- a/pkgs/build-support/fetchsvn/nix-prefetch-svn +++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn @@ -48,7 +48,14 @@ if test -z "$finalPath"; then trap "rm -rf $tmpPath" EXIT # Perform the checkout. - echo p | svn export --quiet -r "$rev" "$url" $tmpFile >&2 + if test "$NIX_PREFETCH_SVN_LEAVE_DOT_SVN" != 1 + then + command="export" + else + command="checkout" + fi + + echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2 # Compute the hash. hash=$(nix-hash --type $hashType $hashFormat $tmpFile)