about summary refs log tree commit diff
path: root/scripts/nix-prefetch-url.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-12-20T14·57+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-12-20T14·57+0000
commit7eed57e784068ae6e2e9bf4409639067df467cd3 (patch)
tree9424c5e456887a896593bc63ddcf0dd7916ba0fd /scripts/nix-prefetch-url.in
parent96c3d8a61550545549dfa31c62e68d16f4e89c0c (diff)
* Sync with changed substitute mechanism.
* Accept the NarHash line.
* Clear substitutes in `nix-channel --update'.

Diffstat (limited to 'scripts/nix-prefetch-url.in')
-rw-r--r--scripts/nix-prefetch-url.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 32f40b5ae6ca..9a67ca1417f2 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -49,7 +49,9 @@ finalPath=$(@bindir@/nix-store -qnB --force-realise $storeExpr)
     
 if ! test -n "$QUIET"; then echo "path is $finalPath" >&2; fi
 
-rm -rf $tmpPath1 $tmpPath2 || true
+if test -n "$tmpPath1" -o -n "$tmpPath2"; then
+    rm -rf $tmpPath1 $tmpPath2 || true
+fi
 
 echo $hash