add a flag --target, so we can override the URL in the MANIFEST file. This
is only for local copies (so file:///)
This commit is contained in:
parent
601a8eab79
commit
4fde308ec0
|
@ -31,6 +31,8 @@ my $localCopy;
|
||||||
my $localArchivesDir;
|
my $localArchivesDir;
|
||||||
my $localManifestFile;
|
my $localManifestFile;
|
||||||
|
|
||||||
|
my $targetArchivesDir;
|
||||||
|
|
||||||
my $archivesPutURL;
|
my $archivesPutURL;
|
||||||
my $archivesGetURL;
|
my $archivesGetURL;
|
||||||
my $manifestPutURL;
|
my $manifestPutURL;
|
||||||
|
@ -41,6 +43,13 @@ if ($ARGV[0] eq "--copy") {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
$localArchivesDir = shift @ARGV;
|
$localArchivesDir = shift @ARGV;
|
||||||
$localManifestFile = shift @ARGV;
|
$localManifestFile = shift @ARGV;
|
||||||
|
if ($ARGV[0] eq "--target") {
|
||||||
|
shift @ARGV;
|
||||||
|
$targetArchivesDir = shift @ARGV;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$targetArchivesDir = $localArchivesDir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
die "syntax: nix-push ARCHIVES_PUT_URL ARCHIVES_GET_URL " .
|
die "syntax: nix-push ARCHIVES_PUT_URL ARCHIVES_GET_URL " .
|
||||||
|
|
Loading…
Reference in a new issue