scripts/download.pl: fix broken link for KERNEL projects
Fix broken link generation for KERNEL projects.
Using $1 in projectsmirrors sub was still referencing the caller $1
instead of the remaining args of projectsmirrors sub.
Use shift and put the second arg of projectsmirrors sub in $append to
correctly handle the sub args.
Fixes: 465cf35888
("scripts/download.pl: detach mirror URLs from script file")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
156f5e8f48
commit
3b83d393dd
|
@ -59,6 +59,7 @@ sub localmirrors {
|
||||||
|
|
||||||
sub projectsmirrors {
|
sub projectsmirrors {
|
||||||
my $project = shift;
|
my $project = shift;
|
||||||
|
my $append = shift;
|
||||||
|
|
||||||
open (PM, "$scriptdir/projectsmirrors.json") ||
|
open (PM, "$scriptdir/projectsmirrors.json") ||
|
||||||
die "Can´t open $scriptdir/projectsmirrors.json: $!\n";
|
die "Can´t open $scriptdir/projectsmirrors.json: $!\n";
|
||||||
|
@ -67,7 +68,7 @@ sub projectsmirrors {
|
||||||
my $mirror = decode_json $mirror_json;
|
my $mirror = decode_json $mirror_json;
|
||||||
|
|
||||||
foreach (@{$mirror->{$project}}) {
|
foreach (@{$mirror->{$project}}) {
|
||||||
push @mirrors, $_ . "/" . ($1 or "");
|
push @mirrors, $_ . "/" . ($append or "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue