UNPKG

345 Bapplication/x-shView Raw
1#!/usr/bin/expect
2
3set ip [lindex $argv 0]
4set port [lindex $argv 1]
5set sopid [lindex $argv 2]
6set sopFilename [lindex $argv 3]
7
8set timeout 1000
9spawn ssh -p $port developer@$ip "/usr/bin/ins-tool -siu /tmp/$sopFilename && rm -f /tmp/$sopFilename"
10expect {
11 "(yes/no)?" {send "yes\r"; exp_continue}
12 "assword:" {send "system\r"}
13}
14expect eof
\No newline at end of file