delete downloaded files after import

This commit fixes #418
This commit is contained in:
Robin C. Ladiges 2024-04-20 21:01:50 +02:00 committed by GitHub
parent 6088b9b37f
commit 3bdfc72c19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

8
run.sh
View File

@ -104,6 +104,14 @@ if [ "$1" == "import" ]; then
${OSM2PGSQL_EXTRA_ARGS:-} \
;
# clean up downloaded files
if [ -n "${DOWNLOAD_PBF:-}" ] && [ -f /data/region.osm.pbf ]; then
rm /data/region.osm.pbf
fi
if [ -n "${DOWNLOAD_POLY:-}" ] && [ -f /data/region.poly ]; then
rm /data/region.poly
fi
# old flat-nodes dir
if [ -f /nodes/flat_nodes.bin ] && ! [ -f /data/database/flat_nodes.bin ]; then
mv /nodes/flat_nodes.bin /data/database/flat_nodes.bin