source: subversion/utils/CityKML/download.pl @ 1931

Last change on this file since 1931 was 1931, checked in by ojw, 13 years ago
  • Property svn:executable set to *
File size: 459 bytes
Line 
1#!/usr/bin/perl
2use LWP::Simple;
3
4# downloads one map then exits
5$numfail = 0;
6for($i = 0; 1; $i++){
7  $URL = "http://almien.co.uk/OSM/Places/Data/$i.osm.gz";
8  $File = "data/data_$i.osm.gz";
9 
10  # If we don't already have a file, download it
11  if(!-f $File){
12    if(is_success(getstore($URL,$File))){
13      print "We've got file $i!\n";
14      exit;
15    }
16  }
17 
18  # Stop if 20 consecutive numbered items don't exist
19  die("Finished\n") if($numfail++ >20);
20}
Note: See TracBrowser for help on using the repository browser.