bin/masterlist2mirmon: properly report URLs without leading "/" in list
authorMichael Prokop <mika@grml.org>
Fri, 9 Jul 2021 16:25:50 +0000 (18:25 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 9 Jul 2021 16:25:50 +0000 (18:25 +0200)
Otherwise /etc/mirmon/mirror.list gets generated with a missing "/" in
the URL (between server/site name and download path) if we don't use
'Grml-http: /grml/' but 'Grml-http: grml/' in Mirrors.masterlist

Fixes: 83b1fc53
Thanks: David Schmitt for the bugreport

bin/masterlist2mirmon

index 0195492..f6ba62a 100755 (executable)
@@ -29,9 +29,9 @@ push @mirrors, $data if $data;
 
 foreach my $mirror (@mirrors) {
     my ($c, $r) = split (/ +/, $mirror->{'country'});
-    printf ("%s http://%s%s\n", $c, $mirror->{'site'}, $mirror->{'grml-http'});
+    printf ("%s http://%s/%s\n", $c, $mirror->{'site'}, $mirror->{'grml-http'});
     if ($mirror->{'grml-ftp'}) {
-        printf ("%s ftp://%s%s\n", $c, $mirror->{'site'}, $mirror->{'grml-ftp'});
+        printf ("%s ftp://%s/%s\n", $c, $mirror->{'site'}, $mirror->{'grml-ftp'});
     }
     if ($mirror->{'grml-rsync'}) {
         printf ("%s rsync://%s/%s\n", $c, $mirror->{'site'}, $mirror->{'grml-rsync'});