2018-05-19 21:18:04 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
2018-05-19 20:36:55 +02:00
|
|
|
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
STARTDATE=$(date +"%Y-%m-%dT%H:%M%z")
|
|
|
|
|
|
|
|
# clean and recreate x_tempshape directory
|
|
|
|
rm -rf x_tempshape
|
|
|
|
mkdir -p x_tempshape
|
|
|
|
log_file=x_tempshape/run_all.log
|
|
|
|
##### backup log from here ...
|
|
|
|
exec &> >(tee -a "$log_file")
|
|
|
|
|
|
|
|
# Don't forget update the VERSION file!
|
|
|
|
cat VERSION
|
|
|
|
|
|
|
|
# Show some debug info
|
2018-05-19 20:36:55 +02:00
|
|
|
python3 ./tools/wikidata/platform_debug_info.py
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
# Fetch latest wikidata labels
|
|
|
|
# --- output: x_tempshape/*/*.new_names.csv files
|
2018-05-19 20:36:55 +02:00
|
|
|
time ./tools/wikidata/update.sh fetch
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
# Write wikidata labels to the shape files
|
|
|
|
# --- output: x_tempshape/*/*.shp files and some audit logs
|
2018-05-19 20:36:55 +02:00
|
|
|
time ./tools/wikidata/update.sh write
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
# show summary
|
2018-05-19 20:36:55 +02:00
|
|
|
cat x_tempshape/update.md
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
# list new files
|
|
|
|
ls -la x_tempshape/*/*
|
|
|
|
|
|
|
|
# Update shape files
|
2018-05-19 20:36:55 +02:00
|
|
|
cp -r x_tempshape/10m_cultural/* 10m_cultural/
|
|
|
|
cp -r x_tempshape/10m_physical/* 10m_physical/
|
2018-05-20 11:44:57 +02:00
|
|
|
cp -r x_tempshape/50m_cultural/* 50m_cultural/
|
|
|
|
cp -r x_tempshape/50m_physical/* 50m_physical/
|
|
|
|
cp -r x_tempshape/110m_cultural/* 110m_cultural/
|
|
|
|
cp -r x_tempshape/110m_physical/* 110m_physical/
|
|
|
|
|
|
|
|
# Run the final update process
|
2018-05-19 21:18:04 +02:00
|
|
|
make clean all
|
2018-05-20 11:44:57 +02:00
|
|
|
|
|
|
|
echo " ---- end of run_all.sh ------ "
|
|
|
|
ls -la $log_file
|