diff options
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}" \ |