]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/taginfo/templates/default/update-planet.erb
Switch taginfo to use planet::current
[chef.git] / cookbooks / taginfo / templates / default / update-planet.erb
diff --git a/cookbooks/taginfo/templates/default/update-planet.erb b/cookbooks/taginfo/templates/default/update-planet.erb
deleted file mode 100644 (file)
index a728ac1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# DO NOT EDIT - This file is being maintained by Chef
-
-# abort on error
-
-set -e
-
-# setup
-
-PLANETDIR="<%= @directory %>/planet"
-LOGDIR="${PLANETDIR}/log"
-PLANETOLD="${PLANETDIR}/planet.pbf"
-PLANETNEW="${PLANETDIR}/planet-new.pbf"
-STATEDIR="${PLANETDIR}/replication"
-OSCFILE="${PLANETDIR}/$(date +%Y%m%d-%H%M).osc"
-
-# start logging
-
-exec > "${LOGDIR}/$(date +%Y%m%d-%H%M).log" 2>&1
-
-# if there are old .osc files, they have to be taken into account
-
-OLDFILE="$(find "${PLANETDIR}" -name "2*-*.osc" -print)"
-if [ -z "$OLDFILE" ]
-then
-   osmosis --rri "$STATEDIR" --simc --write-xml-change "$OSCFILE"
-else
-   osmosis --rxc "$OLDFILE" --rri "$STATEDIR" --mc --simc --write-xml-change "$OSCFILE" && rm "$OLDFILE"
-fi
-
-# osc file is ready, create new planet file
-
-osmosis --read-xml-change "$OSCFILE" --read-bin "$PLANETOLD" --buffer bufferCapacity=12000 --apply-change --buffer bufferCapacity=12000 --write-pbf file="$PLANETNEW"
-
-# cleanup
-
-mv "$PLANETNEW" "$PLANETOLD"
-rm "$OSCFILE"