diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-01-23 23:07:19 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-01-23 23:07:19 +0100 |
commit | 0e74baf1add9e7fea3d07e1c79af88831fc5d5f3 (patch) | |
tree | 0be54f1bea13a4bbbf9d38ed7a5d35d33c749d60 /syncrepo | |
parent | 7793b6247208cc8b1201ba0335ca9a4ead4cafbe (diff) | |
download | repo-tools-working.tar.gz repo-tools-working.tar.xz |
syncrepo: check repo_mtime fileworking
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'syncrepo')
-rwxr-xr-x | syncrepo | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,7 @@ target="${home}/repo" tmp="${home}/tmp" lock='/tmp/mirrorsync.lck' source='pkgbuild.com::packages/' +repo_mtime_url="http://rsync.archlinux.org/repo_mtime" [ ! -d "${target}" ] && mkdir -p "${target}" [ ! -d "${tmp}" ] && mkdir -p "${tmp}" @@ -12,6 +13,10 @@ source='pkgbuild.com::packages/' touch "${lock}" trap "rm -f '${lock}'" EXIT INT TERM +if diff -b <(curl -s "$repo_mtime_url") "$target/repo_mtime" >/dev/null; then + exit 0 +fi + rsync -rtlvH --safe-links --delete-after --progress -h \ --delay-updates --no-motd --bwlimit=1000 \ --temp-dir="${tmp}" \ |