UNPKG

433 Bapplication/x-shView Raw
1#!/usr/bin/expect
2
3set cdbPath [lindex $argv 0]
4set cdbDevice [lindex $argv 1]
5set sopid [lindex $argv 2]
6set appid [lindex $argv 3]
7
8set timeout 1000
9
10spawn $cdbPath -s $cdbDevice shell
11expect {
12 "developer@" {
13 send "exit\r"
14 spawn $cdbPath -s $cdbDevice shell "sdk-invoker 0 $sopid:$appid:uiapp"
15 }
16 "root@" {
17 send "su install\r"
18 expect "install@" {send "sdk-invoker 0 $sopid:$appid:uiapp\r"}
19 }
20
21}
22expect eof