Guest User

Untitled

a guest
Jul 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. sub localmirrors {
  2. my @mlist;
  3. open CONFIG, "<".$ENV{'TOPDIR'}."/.config" and do {
  4. while (<CONFIG>) {
  5. /^CONFIG_LOCALMIRROR="(.+)"/ and do {
  6. chomp;
  7. my @local_mirrors = split(/;/, $1);
  8. push @mlist, @local_mirrors;
  9. };
  10. }
  11. close CONFIG;
  12. };
  13. open LM, "$scriptdir/localmirrors" or
  14. open LM, "$scriptdir/localmirrors.default" or
  15. return @mlist;
  16. while (<LM>) {
  17. chomp $_;
  18. push @mlist, $_ if $_;
  19. print STDERR "$_\n";
  20. }
  21. close LM;
  22. return @mlist;
  23. }
Add Comment
Please, Sign In to add comment