about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorArmijn Hemel <armijn@gpl-violations.org>2006-08-08T15·42+0000
committerArmijn Hemel <armijn@gpl-violations.org>2006-08-08T15·42+0000
commitc0bfcbdd45bfe3c45ab8bf188df926d214675a18 (patch)
treeb97d0dbd5d4563007d8a7b3cb96ed90bdb95854a /scripts
parenta0607be7f4ca2d54332cd9e557b21f6ed7a763d5 (diff)
rework the --target flag. If this flag is used, a URI should be given. Default
values are not changed.

Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-push.in8
1 files changed, 4 insertions, 4 deletions
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";
     }