uestc-careye/script/update_remote_raspi.expect

15 lines
502 B
Plaintext
Raw Normal View History

2020-05-07 00:49:39 +08:00
#!/usr/bin/expect
set timeout 30
set robot_remote_address "192.168.1.108" #此处填写目标树莓派的IP地址
set robot_remote_user "root"
set robot_remote_password "root\n"
set robot_remote_file_path "/root/workspace/uestc-careye"
set robot_remote_ssh $robot_remote_user@$robot_remote_address:$robot_remote_file_path
set robot_local_file_path "src"
spawn echo Push to $robot_remote_ssh
spawn scp -r $robot_local_file_path $robot_remote_ssh
expect "password:"
send $robot_remote_password
interact