diff --git a/bin/download_databases b/bin/download_databases index 3d3ccfba..55923dc1 100755 --- a/bin/download_databases +++ b/bin/download_databases @@ -24,16 +24,23 @@ cd ~/Downloads && /usr/bin/wget -N -c --no-check-certificate --quiet https://dat cd ~/Downloads && /usr/bin/wget -N -c --no-check-certificate --quiet https://data.openaddresses.io/openaddr-collected-global-sa.zip cd $OPENADDR_HOME && rm -rf ?? *.txt summary br mx fr it za es pl be jp kr pt fi de by ch dk ru cz nz tw cl at kz co no uy si xk */*.vrt */*/*.vrt && unzip -o ~/Downloads/openaddr-collected-global-sa.zip && unzip -o ~/Downloads/openaddr-collected-global.zip -# wof-update is in the NJH-Snippets package on GitHub -mkdir -p $WHOSONFIRST_HOME -# cd $WHOSONFIRST_HOME && ./wof-sqlite-download -cd $WHOSONFIRST_HOME && ./wof-update +# wof-update etc. are in the NJH-Snippets package on GitHub +if [ ! -d $WHOSONFIRST_HOME ]; then + mkdir -p $WHOSONFIRST_HOME + # cd $WHOSONFIRST_HOME && wof-sqlite-download + cd $WHOSONFIRST_HOME && wof-clone +else + cd $WHOSONFIRST_HOME && wof-update +fi mkdir -p $OPENADDR_HOME if [ -r $OPENADDR_HOME/openaddresses.sql ]; then mv $OPENADDR_HOME/openaddresses.sql $OPENADDR_HOME/openaddresses.sql.keep chmod 444 $OPENADDR_HOME/openaddresses.sql.keep +else + echo TODO: update the script to download the data from http://results.openaddresses.io + exit fi cd $DR5HN_HOME && git pull diff --git a/lib/Geo/Coder/Free.pm b/lib/Geo/Coder/Free.pm index 86fdb75a..85eafc33 100644 --- a/lib/Geo/Coder/Free.pm +++ b/lib/Geo/Coder/Free.pm @@ -398,7 +398,7 @@ Before running "make", but after running "perl Makefile.PL", run these instructi Optionally set the environment variable OPENADDR_HOME to point to an empty directory and download the data from L into that directory; and optionally set the environment variable WHOSONFIRST_HOME to point to an empty directory and download the data using L. -The script bin/download_databases (see below) will do that for you. +The script bin/download_databases (see below) will do those for you. You do not need to download the MaxMind data, that will be downloaded automatically. You will need to create the database used by Geo::Coder::Free.