From 195b470d70fa2556d6a0e634c4786cb87c43cb72 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 19 Dec 2021 16:54:39 +0100 Subject: [PATCH] contrip/upload: do not fail sftp if directory already exists --- contrib/upload | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 contrib/upload diff --git a/contrib/upload b/contrib/upload old mode 100755 new mode 100644 index 051424980..b8f1058e5 --- a/contrib/upload +++ b/contrib/upload @@ -25,9 +25,12 @@ else fi +# do not fail sftp if directory exists +# see https://stackoverflow.com/questions/51437924/bash-shell-sftp-check-if-directory-exists-before-creating + sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << ! cd electrum-downloads-airlock - mkdir "$version" + -mkdir "$version" cd "$version" mput * bye