about summary refs log tree commit diff
path: root/scripts/nix-push.in
diff options
context:
space:
mode:
authorArmijn Hemel <armijn@gpl-violations.org>2006-08-01T13·15+0000
committerArmijn Hemel <armijn@gpl-violations.org>2006-08-01T13·15+0000
commit4fde308ec047df9691bbfb6f6c1b1fd8d56e8404 (patch)
tree319d5bd424ae29b5ab34b6825713e329f72a8ce1 /scripts/nix-push.in
parent601a8eab79bd2822235bcf508574be668a036f18 (diff)
add a flag --target, so we can override the URL in the MANIFEST file. This
is only for local copies (so file:///)

Diffstat (limited to 'scripts/nix-push.in')
-rw-r--r--scripts/nix-push.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index d6abf62ee6e9..915163eca70b 100644
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -31,6 +31,8 @@ my $localCopy;
 my $localArchivesDir;
 my $localManifestFile;
 
+my $targetArchivesDir;
+
 my $archivesPutURL;
 my $archivesGetURL;
 my $manifestPutURL;
@@ -41,6 +43,13 @@ if ($ARGV[0] eq "--copy") {
     shift @ARGV;
     $localArchivesDir = shift @ARGV;
     $localManifestFile = shift @ARGV;
+    if ($ARGV[0] eq "--target") {
+       shift @ARGV;
+       $targetArchivesDir = shift @ARGV;
+    }
+    else {
+       $targetArchivesDir = $localArchivesDir;
+    }
 }
 else {
     die "syntax: nix-push ARCHIVES_PUT_URL ARCHIVES_GET_URL " .