logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: 98115d0c204a33ad201b1e1bfafd800c8ef822f5
parent: af713d400580b2152617dba59b24013899498520
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  5 May 2018 06:25:47 +0200

sshpaste: Support for uploading multiple files at once

Closes: https://github.com/lanodan/sshpaste/issues/3

Diffstat:

Msshpaste11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sshpaste b/sshpaste @@ -82,9 +82,12 @@ then elif [ ! -z "${opt_command}" ] then sshpaste_command ${opt_command} -elif shift $(($OPTIND - 1)) ; test -n "$1" -then - sshpaste_file "$1" else - sshpaste_usage "$0" + # try to upload the rest of the arguments if they are files + shift $(($OPTIND - 1)) + + for file in "$@" + do test -n "$file" + sshpaste_file "$file" + done fi