From ddcdb6fd6d09853851832ddaab90d003f7cc6184 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 18 Jun 2019 01:02:44 +0200 Subject: scp.sh works with directories. --- scp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.sh b/scp.sh index 27b23fd..368b6bf 100755 --- a/scp.sh +++ b/scp.sh @@ -11,4 +11,4 @@ hostpass="$(echo "$host" | cut -d'#' -f4)" targetPath="$(echo "$host" | cut -d'#' -f5)" echo "Sending to $hostname" [ "$hostpass" ] && pass -c "$hostpass" -[ "$hostport" ] && scp -P $hostport "$@" $hostaddress:$targetPath || scp "$@" $hostaddress:$targetPath # No quotes here! +[ "$hostport" ] && scp -r -P $hostport "$@" $hostaddress:$targetPath || scp -r "$@" $hostaddress:$targetPath # No quotes here! -- cgit v1.2.1