Skip to content

Commit

Permalink
scripts/download.pl: fix broken link for KERNEL projects
Browse files Browse the repository at this point in the history
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: 465cf35 ("scripts/download.pl: detach mirror URLs from script file")
Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
Ansuel committed Jun 19, 2024
1 parent 156f5e8 commit 3b83d39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/download.pl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sub localmirrors {

sub projectsmirrors {
my $project = shift;
my $append = shift;

open (PM, "$scriptdir/projectsmirrors.json") ||
die "Can´t open $scriptdir/projectsmirrors.json: $!\n";
Expand All @@ -67,7 +68,7 @@ sub projectsmirrors {
my $mirror = decode_json $mirror_json;

foreach (@{$mirror->{$project}}) {
push @mirrors, $_ . "/" . ($1 or "");
push @mirrors, $_ . "/" . ($append or "");
}
}

Expand Down

0 comments on commit 3b83d39

Please sign in to comment.