From c0bfcbdd45bfe3c45ab8bf188df926d214675a18 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Tue, 8 Aug 2006 15:42:33 +0000 Subject: rework the --target flag. If this flag is used, a URI should be given. Default values are not changed. --- scripts/nix-push.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 373533190a06..19cc3bed6465 100644 --- a/scripts/nix-push.in +++ b/scripts/nix-push.in @@ -31,7 +31,7 @@ my $localCopy; my $localArchivesDir; my $localManifestFile; -my $targetArchivesDir; +my $targetArchivesUrl; my $archivesPutURL; my $archivesGetURL; @@ -45,10 +45,10 @@ if ($ARGV[0] eq "--copy") { $localManifestFile = shift @ARGV; if ($ARGV[0] eq "--target") { shift @ARGV; - $targetArchivesDir = shift @ARGV; + $targetArchivesUrl = shift @ARGV; } else { - $targetArchivesDir = $localArchivesDir; + $targetArchivesUrl = "file:/$localArchivesDir"; } } else { @@ -199,7 +199,7 @@ for (my $n = 0; $n < scalar @storePaths; $n++) { my $url; if ($localCopy) { - $url = "file://$targetArchivesDir/$narName"; + $url = "$targetArchivesUrl/$narName"; } else { $url = "$archivesGetURL/$narName"; } -- cgit 1.4.1