Skip to content

Commit

Permalink
Only build from dump if we actually downloaded it (update).
Browse files Browse the repository at this point in the history
  • Loading branch information
sligocki committed Mar 22, 2022
1 parent a1c40c0 commit 588b8a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions category_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions dump_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions dump_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 588b8a1

Please sign in to comment.