aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-02-26 17:52:32 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2017-02-26 17:53:04 -0800
commit705c539833859f9cf12e41d5cb449e1c14137c1b (patch)
tree29f65ae04cdbce462831e3441ec4e88b9acfac71
parentEnable $Id$ expansion on gentoo.git. (diff)
downloadmastermirror-scripts-705c539833859f9cf12e41d5cb449e1c14137c1b.tar.gz
mastermirror-scripts-705c539833859f9cf12e41d5cb449e1c14137c1b.tar.bz2
mastermirror-scripts-705c539833859f9cf12e41d5cb449e1c14137c1b.zip
rsync-gen: switch to using git checkouts directly, no rsync indirection.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xrsync-gen.sh18
1 files 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)