#!/usr/bin/expect set port [lindex $argv 0] #set ip 172.29.118 set ip 192.168.20 set timeout -1 spawn ssh root@$ip.$port rm -rf /root/rfic expect { "password" {send "root\r"} } expect eof set timeout -1 spawn ssh root@$ip.$port rm -rf /root/*.txt; expect { "password" {send "root\r"} } expect eof set timeout -1 spawn scp -r ./build/msgtransfer.out ./driver/rfic/csubin/256QAM/ ./driver/rfic/csubin/256QAM/start.sh root@$ip.$port:/root/ expect { "password" {send "root\r"} } expect eof set timeout -1 spawn scp -r ./driver/rfic/resources/ucp_trx_gpioCfg_evmy.json ./driver/rfic/resources/ucp_trx_gpioCfg_evb.json root@$ip.$port:/lib/firmware/resources/ expect { "password" {send "root\r"} } expect eof set timeout -1 spawn ssh root@$ip.$port sync; expect { "password" {send "root\r"} } expect eof