Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
21 lines (17 loc) · 957 Bytes

File metadata and controls

21 lines (17 loc) · 957 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# This will download all files necessary to import the full geonames dump
if hash curl 2>/dev/null; then
curl http://download.geonames.org/export/dump/allCountries.zip > docker/db/allCountries.zip
curl http://download.geonames.org/export/dump/alternateNames.zip > docker/db/alternateNames.zip
curl http://download.geonames.org/export/dump/countryInfo.txt > docker/db/countryInfo.txt
else
wget http://download.geonames.org/export/dump/allCountries.zip > docker/db/allCountries.zip
wget http://download.geonames.org/export/dump/alternateNames.zip > docker/db/alternateNames.zip
wget http://download.geonames.org/export/dump/countryInfo.txt > docker/db/countryInfo.txt
fi
unzip docker/db/allCountries.zip -d docker/db/
unzip docker/db/alternateNames.zip -d docker/db/
# This assumes that you setup your DB as outlined in INSTALL
mysql -u root bewelcome < import.sql
# Some cleanup
rm -rf docker/db/*.zip docker/db/*.txt
Morty Proxy This is a proxified and sanitized view of the page, visit original site.