-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
mprime.exp
47 lines (45 loc) · 1.29 KB
/
mprime.exp
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
#!/usr/bin/expect -f
# Teal Dulcet
# ./mprime.exp <User ID> <Computer name> <Type of work>
set timeout -1
set USERID [lindex $argv 0]
set COMPUTER [lindex $argv 1]
set TYPE [lindex $argv 2]
spawn ./mprime -m
expect "Join Gimps? (*):"
sleep 1
send -- "y\r"
expect "Use PrimeNet to get work and report results (*):"
sleep 1
send -- "y\r"
expect "Your user ID or \"ANONYMOUS\" (*):"
sleep 1
send -- "$USERID\r"
expect "Optional computer name:"
sleep 1
send -- "$COMPUTER\r"
expect {
"Type of work to get (*):" { sleep 1; send -- "$TYPE\r"; exp_continue }
"Upload bandwidth limit in Mbps (*):" { sleep 1; send -- "10000\r"; exp_continue }
"Skip advanced resource settings (*):" { sleep 1; send -- "n\r"; exp_continue }
"Optional directory to hold *:" { sleep 1; send -- "\r"; exp_continue }
"Your choice:" { }
"Use the following values to select a work type:" { exp_continue }
"*: 1" { exp_continue }
" (*):" { sleep 1; send -- "\r"; exp_continue }
}
expect "Done communicating with server."
send \x03
sleep 10
expect "Choose Test/Continue to restart."
sleep 1
send -- "15\r"
expect {
"Days between sending end dates (*):" { sleep 1; send -- "0.25\r"; exp_continue }
"Your choice:" { }
" (*):" { sleep 1; send -- "\r"; exp_continue }
}
expect "Done communicating with server."
sleep 1
send -- "5\r"
expect eof