From 4fde308ec047df9691bbfb6f6c1b1fd8d56e8404 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Tue, 1 Aug 2006 13:15:55 +0000 Subject: [PATCH] add a flag --target, so we can override the URL in the MANIFEST file. This is only for local copies (so file:///) --- scripts/nix-push.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/nix-push.in b/scripts/nix-push.in index d6abf62ee6..915163eca7 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 " .