anchor.diff:  
   # name the dir where this will go
   stamp=$(date +%Y_%m_%d-%H_%M_%S)
  -cur_tile_dir=$(dirname <%= node[:valhalla][:tile_dir] %>)/tiles_${stamp}
   
   # things we need to make if we dont have them
   extracts=$(find <%= node[:valhalla][:extracts_dir] %> -type f -name "*.pbf")
  
positive.code: rm -rf *.bin
  set +e
  
  # generate connectivity map geojson, tile dir is as good a place as any
  # we can ship the whole tile dir to s3 anyway, admin connectivity and all
  pushd <%= node[:valhalla][:tile_dir] %>
  valhalla_build_connectivity -c <%= node[:valhalla][:config] %>
  stats_file=$(jq -r '.mjolnir.statistics' <%= node[:valhalla][:config] %>)
  mv ${stats_file} $(basename ${stats_file} | sed -e "s/\(\.[^.]\+$\)/_${stamp}\1/g")
  stats_file=$(basename ${stats_file} | sed -e "s/\(\.[^.]\+$\)/_${stamp}\1/g")
  mv connectivity2.geojson connectivity_${stamp}.geojson
  popd
  
  # backup files and tile dirs, keep the admin stuff though
  mkdir -p ${cur_tile_dir}
  mv <%= node[:valhalla][:tile_dir] %>/* ${cur_tile_dir}/
  cp -rp ${cur_tile_dir}/$(basename ${admin_file}) <%= node[:valhalla][:tile_dir] %>
  cp -rp ${cur_tile_dir}/$(basename ${timezone_file}) <%= node[:valhalla][:tile_dir] %>
  
  
negative.code: if [ "<%= node[:valhalla][:with_updates] %>" == true ]; then
    {
      tar pcf - -C ${cur_tile_dir} . | pigz -9 > ${cur_tile_dir}.tgz
      rm -rf ${cur_tile_dir} &
      <%= node[:valhalla][:conf_dir] %>/push_tiles.py ${cur_extras_dir}/* ${cur_tile_dir}.tgz
      rm -rf ${cur_extras_dir} ${cur_tile_dir}.tgz
    }&
  fi
  