#!/usr/bin/perl -spi # turn mirror list into http links BEGIN{ use FileHandle; $f = <<'EOF' ; Mirrors: EOF my $MIRRORS = shift; if( not $MIRRORS or not $ARGV[0] ){ print STDERR "use: $0 Mirrorlist Updatefile\n"; exit 1; } my($m); $m = FileHandle->new("<$MIRRORS") or die "cannot open $MIRRORS"; while( <$m> ){ my ($site,$where) = split; $f .= <$site $where EOF } close($m); $f .= <<'EOF' ; EOF } if( /MIRRORSTART/../MIRROREND/ ){ $_ = ""; if( !$done ){ print $f; $done = 1; } }