From 588b8a1dcfeefa2956ec99057289a6500d575587 Mon Sep 17 00:00:00 2001 From: Shawn Ligocki Date: Tue, 22 Mar 2022 14:09:24 -0400 Subject: [PATCH] Only build from dump if we actually downloaded it (update). --- category_check.py | 4 ++-- dump_download.sh | 2 ++ dump_update.sh | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/category_check.py b/category_check.py index 44047b3..39ba41a 100644 --- a/category_check.py +++ b/category_check.py @@ -91,10 +91,10 @@ def main(): "Pakość", "Pakosc", "Pakosch", "Złotniki Kujawskie", "Güldenhof", "Guldenhof", "Dąbrowa Biskupia", "Luisenfelde", - # "Rojewo", TODO: matches Dobrojewo #"Roneck", TODO: matches Mamaroneck + # "Rojewo", TODO: matches Dobrojewo # "Roneck", TODO: matches Mamaroneck # Towns in Strelno, Posen that are now in Inowrocław county "Ludzisko", "Ludzisk", - "Polanowitz", # Removed "Polanowice" (there are several: https://pl.wikipedia.org/wiki/Polanowice) + # Removed: "Polanowitz", "Polanowice" (there are several: https://pl.wikipedia.org/wiki/Polanowice) # Removed "Piaski" because there's Piaski, Warsaw too :/ # Specific towns in Inowrocław "Płonkowo", "Plonkowo", "Tuczno", diff --git a/dump_download.sh b/dump_download.sh index 8f4a01e..537cf0f 100644 --- a/dump_download.sh +++ b/dump_download.sh @@ -18,9 +18,11 @@ echo "Data dump version: $TIMESTAMP" export TIMESTAMP if [ -d data/dumps/$TIMESTAMP ]; then + DOWNLOADED=false echo "We already have this dump" echo "Done" else + DOWNLOADED=true echo "We don't yet have this dump: downloading it" mkdir data/dumps/$TIMESTAMP # cd in a subshell so that we don't permanently change directories. diff --git a/dump_update.sh b/dump_update.sh index 40f05e9..79cc42b 100755 --- a/dump_update.sh +++ b/dump_update.sh @@ -6,8 +6,10 @@ set -e # source dump_download.sh so that we set $TIMESTAMP source dump_download.sh -time bash dump_build.sh $TIMESTAMP +if $DOWNLOADED; then + time bash dump_build.sh $TIMESTAMP -echo "Update default version" -rm -f data/version/default -ln -s $TIMESTAMP data/version/default + echo "Update default version" + rm -f data/version/default + ln -s $TIMESTAMP data/version/default +fi