-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathexpecter.sh
executable file
·60 lines (39 loc) · 1.24 KB
/
expecter.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/expect
set timeout -1
spawn ./install.sh --ignore-signature
expect "Press" {send "\r"}
for {set i 1} {$i < 100} {incr i 1} {
send " "
}
expect "Type \"accept\" to continue or \"decline\" to go back to the previous menu:"
send "\r"
send "accept\r"
expect "Please type a selection:"
send "2\r"
expect "Please type a selection or press \"Enter\" to accept default choice \\\[ 1 \\\]:"
send "\r"
for {set i 1} {$i < 10} {incr i 1} {
send " "
}
send "\r"
expect "Please type a selection or press \"Enter\" to accept default choice \\\[ 1 \\\]:"
send "1\r"
# expect {
# "Please type a selection or press \"Enter\" to accept default choice \\\[ n \\\]: " {
# send "y\r"
# expect "Please type a selection or press \"Enter\" to accept default choice \\\[ 1 \\\]:"
# send "\r"
# expect "Press \"Enter\" key to quit:"
# send "\r"
# }
# "Please type a selection or press \"Enter\" to accept default choice \\\[ 1 \\\]: " {
# send "hi"
# send "1\r"
# expect "Press \"Enter\" key to quit:"
# send "\r"
# }
# }
expect "Please type a selection or press \"Enter\" to accept default choice \\\[ 1 \\\]:"
send "1\r"
expect "Press \"Enter\" key to quit:"
send "\r"