Skip to content

Commit 7b6d32c

Browse files
author
Sergio Cruz
committed
Limpieza de código residual.
1 parent 169f739 commit 7b6d32c

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

geonames_importer.sh

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ usage() {
5757
echo " drop-db: Removes the db completely."
5858
echo " truncate-db: Removes geonames data from db."
5959
echo
60-
# echo " The rest of parameters indicates the following information:"
61-
# echo " -u <user> User name to access database server."
62-
# echo " -p <password> User password to access database server."
63-
# echo " -h <host> Data Base Server address (default: localhost)."
64-
# echo " -r <port> Data Base Server Port (default: 3306)"
65-
# echo " -n <dbname> Data Base Name for the geonames.org data (default: geonames)"
6660
exit -1
6761
}
6862

@@ -76,23 +70,6 @@ dump_db_params() {
7670
echo "DB Name: " $dbname
7771
}
7872

79-
# download_geonames_data() {
80-
# echo "Downloading GeoNames.org data..."
81-
# download_folder="$1"
82-
# dumps="allCountries.zip alternateNames.zip hierarchy.zip admin1CodesASCII.txt admin2Codes.txt featureCodes_en.txt timeZones.txt countryInfo.txt"
83-
# zip_codes="allCountries.zip"
84-
# for dump in $dumps; do
85-
# wget -c -P "$download_folder" http://download.geonames.org/export/dump/$dump
86-
# done
87-
# for zip in $zip_codes; do
88-
# wget -c -P "$download_folder" -O "${zip:0:(-4)}_zip.zip" http://download.geonames.org/export/zip/$zip
89-
# done
90-
# unzip "*_zip.zip" -d ./zip
91-
# rm *_zip.zip
92-
# unzip "*.zip"
93-
# rm *.zip
94-
# }
95-
9673
if [ $# -lt 1 ]; then
9774
usage
9875
exit 1
@@ -103,19 +80,6 @@ echo "Current working folder: $working_dir"
10380
echo "Current data folder: $data_dir"
10481
echo "Default download folder: $download_folder"
10582

106-
# Deals operation mode 1 (Download data bundles from geonames.org)
107-
#if { [ "$1" == "--download-data" ]; } then
108-
# if { [ "$2" != "" ]; } then
109-
# if [ ! -d "$2" ]; then
110-
# echo "Folder '$2' doesn't exists. Run mkdir..."
111-
# mkdir "$2"
112-
# fi
113-
# download_folder="$2"
114-
# fi
115-
# echo "download_folder=$download_folder"
116-
# download_geonames_data "$download_folder"
117-
#fi
118-
11983
# Deals with operation mode 2 (Database issues...)
12084
# Parses command line parameters.
12185
while getopts "a:u:p:h:r:n:" opt;
@@ -194,16 +158,6 @@ case $action in
194158
;;
195159
esac
196160

197-
# if [ -z $dbusername ]; then
198-
# echo "No user name provided for accessing the database. Please write some value in parameter -u..."
199-
# exit 1
200-
# fi
201-
202-
# if [ -z $dbpassword ]; then
203-
# echo "No user password provided for accessing the database. Please write some value in parameter -p..."
204-
# exit 1
205-
# fi
206-
207161
case "$action" in
208162
create-db)
209163
echo "Creating database $dbname..."

0 commit comments

Comments
 (0)