[tor-commits] [check/master] Avoid re-downloading descriptors.
arlo at torproject.org
arlo at torproject.org
Wed Nov 13 23:58:53 UTC 2013
commit 7620910a57766d4580b277d4a6756e8d9f81e3b8
Author: Arlo Breault <arlolra at gmail.com>
Date: Mon Nov 4 23:25:58 2013 -0800
Avoid re-downloading descriptors.
Make use of rsync's --delete old descriptors.
Remove -u flag to date to compare with system date. Rsync seems to do
that conversion.
---
Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index bdf5bc1..0f7e460 100644
--- a/Makefile
+++ b/Makefile
@@ -41,12 +41,10 @@ data/cached-descriptors: descriptors
find data/descriptors -type f -mmin -60 | xargs cat > data/cached-descriptors
@echo "Done"
-descriptors_cutoff = $(shell date -u -v-1H -v-30M "+%Y/%m/%d %H:%M:%S")
+descriptors_cutoff = $(shell date -v-1H -v-30M "+%Y/%m/%d %H:%M:%S")
descriptors: data/descriptors/
- @echo "Removing old descriptors"
- @rm -r ./data/descriptors
@echo "Getting latest descriptors (This may take a while)"
- @rsync $(rsync_server)::$(descriptors_dir) | awk 'BEGIN { before="$(descriptors_cutoff)"; } before < ($$3 " " $$4) && ($$5!=".") {print $$5}' | rsync -avz --files-from=- $(rsync_server)::$(descriptors_dir) --delete ./data/descriptors/
+ @rsync $(rsync_server)::$(descriptors_dir) | awk 'BEGIN { before="$(descriptors_cutoff)"; } before < ($$3 " " $$4) && ($$5 != ".") { print $$5; }' | rsync -avz --files-from=- $(rsync_server)::$(descriptors_dir) --delete ./data/descriptors/
@echo Done
data/langs: data/
More information about the tor-commits
mailing list