From 03b3ad3c525b1c50bbdc5f70b5e2d2b0b151fede Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 7 Aug 2019 20:29:30 +0100 Subject: [PATCH] Bugfix: Use xargs to upload deb files one at a time --- build | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build b/build index 225631b..e3cdd4a 100755 --- a/build +++ b/build @@ -102,14 +102,23 @@ task_archive() { task_end $?; } -task_upload-release() { - task_begin "Uploading release .deb file"; +# $1 - The filename to upload +_upload_deb() { + filename="${1}"; sftp -i "${SSH_KEY_PATH}" -P "${deploy_ssh_port}" -o PasswordAuthentication=no "${deploy_ssh_user}@${deploy_ssh_host}" << SFTPCOMMANDS -put ./*.deb ${deploy_root_dir} +put ${filename} ${deploy_root_dir} bye SFTPCOMMANDS + +} + +task_upload-release() { + task_begin "Uploading release .deb file"; + + + find . -maxdepth 1 -type f -name "*.deb" | xargs -n1 -I{} bash -c '_upload_deb "{}"'; task_end $?; }