Skip to content

Commit 21d59f1

Browse files
committed
Adapt the script to grlib's download page changes
1 parent 7093540 commit 21d59f1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

archiver

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
# TODO MULTIPLE ORIGINS
44

55
# Crude but works ↓
6-
my $url = https://www.gaisler.com/index.php/downloads/grlib;
6+
my $url = https://www.gaisler.com/grlib-ip-library;
77
my $page = run(:out, <curl -->, $url).out.slurp;
8-
my $line = $page.lines.grep(/「<a href="/products/grlib/grlib-gpl」/).head;
98

10-
my ($tar-link, $changelog-link) = ($line ~~ m:g/‘href="’(<-["]>+)‘"’/)»[0.Str;
9+
$page.match: /(‘https://download.gaisler.com/products/GRLIB/bin/grlib-gpl-’ .+? .tar.gz)/;
10+
my $tar-link = ~$0;
11+
my $changelog-link = http://download.gaisler.com/products/GRLIB/doc/Changelog.txt;
1112

12-
run <curl --remote-name -->, https://www.gaisler.com~$changelog-link, :cwd(files);
13-
run <curl --remote-name -->, https://www.gaisler.com~$tar-link, :cwd(snapshots);
13+
run <curl --remote-name -->, $changelog-link, :cwd(files);
14+
run <curl --remote-name -->, $tar-link, :cwd(snapshots);
1415

1516
my @snapshots = dir snapshots;
1617
@snapshots .= map: { die unless /-b(\d+).tar.gz$ /; +$0 => $_ };

0 commit comments

Comments
 (0)