From 705c539833859f9cf12e41d5cb449e1c14137c1b Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 26 Feb 2017 17:52:32 -0800 Subject: rsync-gen: switch to using git checkouts directly, no rsync indirection. Signed-off-by: Robin H. Johnson --- rsync-gen.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rsync-gen.sh b/rsync-gen.sh index 87eb85d..e55b2c1 100755 --- a/rsync-gen.sh +++ b/rsync-gen.sh @@ -25,6 +25,7 @@ umask 022 source /usr/local/bin/mastermirror/rsync-gen.vars +BINDIR=${BINDIR:=$(dirname $0)} # block_start and block___end are named to keep function _log() { @@ -80,16 +81,17 @@ timelog_start "ENTIRE SCRIPT" | timelogger #cp -al ${FINALDIR_repo_gentoo}/ ${FINALDIR_repo_gentoo}.bak/ #echo "END BACKUP $(date -u)" | timelogger -# 1) Update rsync checkouts or exports from cvs.g.o::mastermirror-staging -PASSWD_FILE="/etc/mastermirror-fetch/gcvsd-rsync.rsync.passwd" +# 1) Update checkouts from git.g.o RSYNC="/usr/bin/rsync" -RSYNC_ARGS="--no-motd --recursive --times --links --port=60024 --password-file ${PASSWD_FILE} --ignore-errors --timeout=300 --checksum" -RSYNC_ARGS="${RSYNC_ARGS} --quiet --chmod=a+r,go-w" -RSYNC_ARGS_DELETE="--delete --delete-after --delete-excluded" -timelog_start "STAGING RSYNC" | timelogger -${RSYNC} ${RSYNC_ARGS} ${RSYNC_ARGS_DELETE} git.gentoo.org::mastermirror-staging/ ${EXPORTS}/ -timelog___end "STAGING RSYNC" | timelogger +timelog_start "STAGING FROM GIT" | timelogger +$BINDIR/mastermirror-staging.sh +rc=$? +timelog___end "STAGING FROM GIT" | timelogger +if [[ $rc -ne 0 ]]; then + timelog___end "ENTIRE SCRIPT - ABORTED DUE TO CHECKOUT FAILURE" | timelogger + exit 1 +fi # end 1) # start 1a) -- cgit v1.2.3-65-gdbad