From a5274464ccb7df68b8b154511b03ce94df324b69 Mon Sep 17 00:00:00 2001 From: booo Date: Thu, 27 Sep 2012 11:14:27 +0200 Subject: Fix osm sync script. Do not reload subdirectories on every sync. --- bin/sync-osm-planet.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/sync-osm-planet.sh b/bin/sync-osm-planet.sh index 6a2cd1a..2bea5e6 100755 --- a/bin/sync-osm-planet.sh +++ b/bin/sync-osm-planet.sh @@ -7,6 +7,9 @@ RSYNC_OPTS=( "-Hax" "--delete" "--delete-excluded" + "--include=planet/" + "--include=planet/$(date +%Y)/" + "--include=pbf/" "--include=*-$(date +%y%m)*" "--include=*-$(date -d '-1month' +%y%m)*" "--include=*-$(date -d '-2month' +%y%m)*" @@ -24,9 +27,7 @@ TRACKER=( "udp://tracker.openbittorrent.com:80/announce" ) MKTORRENT_OPTS=( "-l 22" ) -${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}planet/" "${DST}planet/" -${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}planet/$(date +%Y)/" "${DST}planet/$(date +%Y)/" -${RSYNC} "${RSYNC_OPTS[@]}" "${SRC}pbf/" "${DST}pbf/" +${RSYNC} "${RSYNC_OPTS[@]}" ${SRC} ${DST} # create torrents #for file in ${DST}/*.bz2 -- cgit v1.2.3-1-g7c22