Created
April 10, 2019 20:30
-
-
Save cquest/13079e1da7217b542ff2b0251cf89535 to your computer and use it in GitHub Desktop.
script d'update pour osm2pgsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -f lock ] | |
then | |
touch lock | |
osmupdate -v $(osmconvert update_last.osc.gz --out-timestamp) update.osc.gz \ | |
&& /usr/bin/osm2pgsql --number-processes=4 -a -C 64 -k -m -G -s -S osm2pgsql-choosen.style -d osm --flat-nodes /ssd-nvme/osm2pgsql/flat-nodes.raw --keep-coastlines --tag-transform-script config/activate-relation-type-waterway.lua --prefix=planet_osm update.osc.gz \ | |
&& mv update.osc.gz update_last.osc.gz \ | |
&& echo "timestamp=$(osmconvert update_last.osc.gz --out-timestamp)" > state.txt \ | |
&& touch -t $(osmconvert update_last.osc.gz --out-timestamp | sed 's/[^0-9]//g;s/\([0-9][0-9]\)$/.\1/') state.txt \ | |
&& rm lock | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment