File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,14 @@ usage() {
3939
4040download_geonames_data () {
4141 echo " Downloading GeoNames.org data..."
42- wget -c http://download.geonames.org/export/dump/allCountries.zip
43- wget -c http://download.geonames.org/export/dump/alternateNames.zip
44- wget -c http://download.geonames.org/export/dump/hierarchy.zip
45- wget -c http://download.geonames.org/export/dump/admin1CodesASCII.txt
46- wget -c http://download.geonames.org/export/dump/admin2Codes.txt
47- wget -c http://download.geonames.org/export/dump/featureCodes_en.txt
48- wget -c http://download.geonames.org/export/dump/timeZones.txt
49- wget -c http://download.geonames.org/export/dump/countryInfo.txt
50- wget -c -O allCountries_zip.zip http://download.geonames.org/export/zip/allCountries.zip
42+ dumps=" allCountries.zip alternateNames.zip hierarchy.zip admin1CodesASCII.txt admin2Codes.txt featureCodes_en.txt timeZones.txt countryInfo.txt"
43+ zip_codes=" allCountries.zip"
44+ for dump in $dumps ; do
45+ wget -c http://download.geonames.org/export/dump/$dump
46+ done
47+ for zip in $zip_codes ; do
48+ wget -c -O " ${zip: 0: (-4)} _zip.zip" http://download.geonames.org/export/zip/$zip
49+ done
5150 unzip allCountries.zip
5251 unzip alternateNames.zip
5352 unzip hierarchy.zip
You can’t perform that action at this time.
0 commit comments