UNPKG

356 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 appid [lindex $argv 3]
7
8set timeout 1000
9spawn ssh -p $port developer@$ip "sdk-invoker 0 $sopid:$appid:uiapp"
10expect {
11 "(yes/no)?" {send "yes\r"; exp_continue}
12 "assword:" {send "system\r"}
13}
14interact {
15 timeout 60 {send "\x20"}
16}
17expect eof