X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/e682a35a26a7106212d3da34665984b78b2c7505..c49b0d9c728b6380d6de69e468296af0ccc5e018:/cookbooks/cplanet/templates/default/update-planet.erb?ds=sidebyside diff --git a/cookbooks/cplanet/templates/default/update-planet.erb b/cookbooks/cplanet/templates/default/update-planet.erb index e992c3578..6c77eafa6 100644 --- a/cookbooks/cplanet/templates/default/update-planet.erb +++ b/cookbooks/cplanet/templates/default/update-planet.erb @@ -8,11 +8,16 @@ PLANETDIR="<%= @basedir %>/planet" PLANETPREV="${PLANETDIR}/planet-previous.pbf" PLANETCURR="${PLANETDIR}/planet.pbf" PLANETNEW="${PLANETDIR}/planet-new.pbf" +PLANETTMP="${PLANETDIR}/planet-tmp.pbf" + +pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR +retval=$? -retval=1 while [ $retval -eq 1 ]; do - pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR + mv "$PLANETNEW" "$PLANETTMP" + pyosmium-up-to-date -v -o $PLANETNEW $PLANETTMP retval=$? + rm "$PLANETTMP" done if [ $retval -ne 0 ]; then