Fix fail recursive upload using scp + expect (ks-upr)

This commit is contained in:
q3aql 2023-02-11 17:00:29 +01:00
parent 8c2aa0f375
commit 79752b15c5

View File

@ -168,7 +168,7 @@ EOF
elif [ "${toolSelected}" == "scp-e" ] ; then elif [ "${toolSelected}" == "scp-e" ] ; then
# Sync files using scp with expect # Sync files using scp with expect
/usr/bin/expect <<EOF /usr/bin/expect <<EOF
spawn /usr/bin/scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} -r ${2}/* ${3}@${4}:${5}/ spawn /usr/bin/scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} -r ${2}/ ${3}@${4}:${5}/
set timeout -1 set timeout -1
expect "*?assword:*" expect "*?assword:*"
send "${1}\n" send "${1}\n"
@ -213,7 +213,7 @@ EOF
elif [ "${toolSelected}" == "scp-e" ] ; then elif [ "${toolSelected}" == "scp-e" ] ; then
# Sync files using scp with expect # Sync files using scp with expect
expect <<EOF expect <<EOF
spawn scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} -r ${2}/* ${3}@${4}:${5}/ spawn scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} -r ${2}/ ${3}@${4}:${5}/
set timeout -1 set timeout -1
expect "*?assword:*" expect "*?assword:*"
send "${1}\n" send "${1}\n"