forked from foursquare/twofishes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
download-world.sh
executable file
·39 lines (34 loc) · 807 Bytes
/
download-world.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -x
mkdir -p data/downloaded/
mkdir -p data/downloaded/zip/
FILE=data/downloaded/allCountries.txt
if [ -f $FILE ];
then
echo "File $FILE exists."
else
curl -o $FILE.zip https://download.geonames.org/export/dump/allCountries.zip
unzip $FILE.zip
mv allCountries.txt $FILE
rm $FILE.zip
fi
FILE=data/downloaded/alternateNames.txt
if [ -f $FILE ];
then
echo "File $FILE exists."
else
curl -o $FILE.zip https://download.geonames.org/export/dump/alternateNames.zip
unzip $FILE.zip
mv alternateNames.txt $FILE
rm $FILE.zip
fi
FILE=data/downloaded/zip/allCountries.txt
if [ -f $FILE ];
then
echo "File $FILE exists."
else
curl -o $FILE.zip https://download.geonames.org/export/zip/allCountries.zip
unzip $FILE.zip
mv allCountries.txt $FILE
rm $FILE.zip
fi