From 39eaeaa4b2e021ec44cc63c70493f9c9ef0c8ba4 Mon Sep 17 00:00:00 2001 From: Orhun Parmaksız Date: Mon, 7 Aug 2023 14:29:30 +0300 Subject: feat(offload-build): use rsync instead of scp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit simply replaces the usage of `scp` with `rsync` for faster file transfer. Signed-off-by: Orhun Parmaksız --- src/offload-build.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/offload-build.in b/src/offload-build.in index 8992c23..7a8c1fd 100644 --- a/src/offload-build.in +++ b/src/offload-build.in @@ -23,6 +23,7 @@ fi repo=extra arch=x86_64 server=build.archlinux.org +rsyncopts=(-e ssh -c -h -L --progress --partial -y) usage() { cat <<- _EOF_ @@ -124,7 +125,7 @@ mapfile -t files < <( if (( ${#files[@]} )); then printf '%s\n' '' '-> copying files...' - scp "${files[@]/#/$server:}" "${TEMPDIR}/" + rsync "${rsyncopts[@]}" "${files[@]/#/$server:}" "${TEMPDIR}/" || die mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/" mv "${TEMPDIR}/PKGBUILD" "${PWD}/" else -- cgit v1.2.3-70-g09d2