2
# Helper script to connect and download using sftp
3
# Invoked from download action
4
# Usage: sftp_get.sh user password host remote_dir localpath
6
set user [lindex $argv 0]
7
set password [lindex $argv 1]
8
set host [lindex $argv 2]
9
set r_dir [lindex $argv 3]
10
set localpath [lindex $argv 4]
13
spawn sftp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $user@$host
18
send "get -r $r_dir $localpath\n"