From 836c139abd4d49845ce4af689f892fca5fde8ffe Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 14 Nov 2022 15:37:11 -0700 Subject: [PATCH] Using latest dc map because old ones are cleaned up quickly. I had used the specific day to avoid errors in latest. --- scripts/initialize_map.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/initialize_map.sh b/scripts/initialize_map.sh index 7236e229..eaf6824c 100755 --- a/scripts/initialize_map.sh +++ b/scripts/initialize_map.sh @@ -8,10 +8,15 @@ fi set -x # Use D.C. to initialized DB because it is so small. -DC_MAP=district-of-columbia-221105.osm.pbf +DC_MAP=district-of-columbia-latest.osm.pbf wget --continue https://download.geofabrik.de/north-america/us/${DC_MAP} -O /tmp/${DC_MAP} || : -cd /opt/openstreetmap-carto || exit 2 +if [ ! -f "/tmp/${DC_MAP}" ]; then + echo "Could not download D.C. map" + exit 2 +fi + +cd /opt/openstreetmap-carto || exit 3 # Initialize indexes and global polygons. This may take multiple tries. MAX_TRIES=3 @@ -41,7 +46,7 @@ done if [[ "${SUCCESS}" == false ]]; then echo "Could not initialize map data. Try running reset_map.sh, or install.sh." - exit 3 + exit 4 fi echo "Map has successfully been initialized"