set -e

# First use download_databases to download the databases, then use this
# script to build the G:C:F database in the directory $OPENADDR_HOME

export OPENADDR_HOME="${OPENADDR_HOME:-~/etc/openaddr}"

cd ~/src/njh/Geo-Coder-Free
git pull
mv $OPENADDR_HOME/*.sql $OPENADDR_HOME/openaddresses.sql.keep
chmod 444 $OPENADDR_HOME/openaddresses.sql.keep
REDIS_SERVER= make
