diff options
author | Bernie Innocenti <bernie@codewiz.org> | 2010-07-29 21:04:13 (GMT) |
---|---|---|
committer | Bernie Innocenti <bernie@codewiz.org> | 2010-07-29 21:04:13 (GMT) |
commit | 041b77d7df0bd595f2e16f69a13f8d27b5d9051a (patch) | |
tree | 7f98f2b498e7bfbf5d3d8c5425ef79c00025844b /rpms | |
parent | f660fc97cdef32ad750994c55971e92c33f84b8c (diff) |
uploadrpm: Optimize connections to the remote host
Diffstat (limited to 'rpms')
-rwxr-xr-x | rpms/common/uploadrpm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rpms/common/uploadrpm b/rpms/common/uploadrpm index f68539a..132cd75 100755 --- a/rpms/common/uploadrpm +++ b/rpms/common/uploadrpm @@ -34,13 +34,20 @@ srpm_dir=$dir/../SRPMS shopt -s extglob set -x + +# Optimize multiple connections with a single master +# Put this in your ~/.ssh/config: +# ControlPath ~/.ssh/s/%r@%h:%p +# ControlMaster auto +[ -n "$remote" ] && ssh -f "$remote" "sleep 10" + $rsync $dir/$spec "$repourl/specs/" $rsync $rpms_dir/$base-!(debuginfo-*|*src).rpm "$repourl/$arch/os/" $rsync $rpms_dir/$base-debuginfo-*.rpm "$repourl/$arch/debug/" $rsync $srpm_dir/$base-*.src.rpm "$repourl/source/" for repo in "$repodir/$arch/os" "$repodir/$arch/debug" "$repodir/source"; do - if [ -n "$remote"]; then + if [ -n "$remote" ]; then ssh $remote "createrepo '$repo'; chmod -R g+w '$repo/repodata'" else createrepo "$repo"; chmod -R g+w "$repo/repodata" |