rework the --target flag. If this flag is used, a URI should be given. Default
values are not changed.
This commit is contained in:
parent
a0607be7f4
commit
c0bfcbdd45
|
@ -31,7 +31,7 @@ my $localCopy;
|
||||||
my $localArchivesDir;
|
my $localArchivesDir;
|
||||||
my $localManifestFile;
|
my $localManifestFile;
|
||||||
|
|
||||||
my $targetArchivesDir;
|
my $targetArchivesUrl;
|
||||||
|
|
||||||
my $archivesPutURL;
|
my $archivesPutURL;
|
||||||
my $archivesGetURL;
|
my $archivesGetURL;
|
||||||
|
@ -45,10 +45,10 @@ if ($ARGV[0] eq "--copy") {
|
||||||
$localManifestFile = shift @ARGV;
|
$localManifestFile = shift @ARGV;
|
||||||
if ($ARGV[0] eq "--target") {
|
if ($ARGV[0] eq "--target") {
|
||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
$targetArchivesDir = shift @ARGV;
|
$targetArchivesUrl = shift @ARGV;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$targetArchivesDir = $localArchivesDir;
|
$targetArchivesUrl = "file:/$localArchivesDir";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -199,7 +199,7 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
|
||||||
|
|
||||||
my $url;
|
my $url;
|
||||||
if ($localCopy) {
|
if ($localCopy) {
|
||||||
$url = "file://$targetArchivesDir/$narName";
|
$url = "$targetArchivesUrl/$narName";
|
||||||
} else {
|
} else {
|
||||||
$url = "$archivesGetURL/$narName";
|
$url = "$archivesGetURL/$narName";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue