- if [ -f <%= @basedir %>/db/replicate-id ]; then
- # first apply any pending updates
- if [ -f <%= @basedir %>/diffs/latest.osc ]; then
- DATA_VERSION=`osmium fileinfo -e -g data.timestamp.last <%= @basedir %>/diffs/latest.osc`
- if [ "x$DATA_VERSION" != "x" ]; then
- echo "Downloaded up to timestamp $DATA_VERSION"
- while ! <%= @basedir %>/bin/update_from_dir --osc-dir=<%= @basedir %>/diffs --version=$DATA_VERSION $META --flush-size=0; do
- echo "Error while updating. Retry in 1 min."
- sleep 60
- done
- fi
- rm <%= @basedir %>/diffs/latest.osc
+if [ -f <%= @basedir %>/db/replicate-id ]; then
+ # first apply any pending updates
+ if [ -f <%= @basedir %>/diffs/latest.osc ]; then
+ DATA_VERSION=`osmium fileinfo -e -g data.timestamp.last <%= @basedir %>/diffs/latest.osc`
+ if [ "x$DATA_VERSION" != "x" ]; then
+ echo "Downloaded up to timestamp $DATA_VERSION"
+ while ! <%= @basedir %>/bin/update_from_dir --osc-dir=<%= @basedir %>/diffs --version=$DATA_VERSION $META --flush-size=0; do
+ echo "Error while updating. Retry in 1 min."
+ sleep 60
+ done