From: Silvio Rhatto Date: Sun, 1 Jan 2023 19:30:42 +0000 (-0300) Subject: Minor copy-annotations-from-kobo enhancements (2) X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f375d80d17d7ab02e7045d5f2aa2eeff6192f4f6;p=scripts.git Minor copy-annotations-from-kobo enhancements (2) --- diff --git a/copy-annotations-from-kobo b/copy-annotations-from-kobo index 271328f..19c894c 100755 --- a/copy-annotations-from-kobo +++ b/copy-annotations-from-kobo @@ -14,7 +14,8 @@ PATTERN="$1" # https://serverfault.com/questions/36421/stop-ssh-login-from-printing-motd-from-the-client#38160 function silentSsh { local connectionString="$1" - local commands="$2" + shift + local commands="$*" if [ -z "$commands" ]; then commands=`cat` fi @@ -34,6 +35,19 @@ show --search "$PATTERN" | while read item; do extension="$(echo $item | sed -e "s|$basename.||")" sdr="$basename.sdr" + # Check if remote file exists + silentSsh $REMOTE <