Add update script

This commit is contained in:
Pieter Vander Vennet 2024-03-28 10:37:58 +01:00
parent df0b43ba41
commit 857b3a6384
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#! /bin/bash
cd ~/Downloads
for F in *.osm.pbf
do
LATEST="$F"
done
mv "$LATEST" ~/data/planet-latest.osm.pbf
cd ~/data
osm2pgsql -O flex -S build_db.lua -s --flat-nodes=import-help-file -d postgresql://user:password@localhost:5444/mapcomplete-cache planet-latest.osm.pbf
echo "on_data_downloaded.sh has finished!"

View file

@ -0,0 +1,5 @@
#! /bin/bash
npm run generate:buildDbScript
mv build_db.sh ~/data/
transmission-cli https://planet.osm.org/pbf/planet-latest.osm.pbf.torrent -f ./on_data_downloaded.sh &>nohup_transmission.log