delete downloaded files after import

This commit fixes #418
This commit is contained in:
Robin C. Ladiges authored and GitHub committed 2024-04-20 21:01:50 +02:00
1 parent 6088b9b37f
commit 3bdfc72c19
1 file changed
+8
+8
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