Line | |
---|
1 | if { $argc != 2 } {
|
---|
2 | puts "Wrong number of arguments, expecting path to SteamCMD script and AppId"
|
---|
3 | exit 1
|
---|
4 | }
|
---|
5 |
|
---|
6 | set timeout 30
|
---|
7 |
|
---|
8 | set STEAMCMD [lindex $argv 0]
|
---|
9 | set APPID [lindex $argv 1]
|
---|
10 |
|
---|
11 | spawn $STEAMCMD +login anonymous +app_info_request $APPID +app_info_update +app_info_update 1 +app_info_print $APPID
|
---|
12 |
|
---|
13 |
|
---|
14 | expect {
|
---|
15 | "Connecting anonymously" { }
|
---|
16 | timeout { puts "\n\nNo connect message found, aborting\n\n"; exit 2 }
|
---|
17 | }
|
---|
18 |
|
---|
19 | expect {
|
---|
20 | "App info request sent" { }
|
---|
21 | timeout { puts "\n\nNo AppInfo request sent, aborting\n\n"; exit 3 }
|
---|
22 | }
|
---|
23 |
|
---|
24 | expect {
|
---|
25 | "\"$APPID\"" { }
|
---|
26 | timeout { puts "\n\nNo result body found, aborting\n\n"; exit 4 }
|
---|
27 | }
|
---|
28 |
|
---|
29 | expect {
|
---|
30 | "\n\}" { }
|
---|
31 | timeout { puts "\n\nNo end of result found, aborting\n\n"; exit 5 }
|
---|
32 | }
|
---|
33 |
|
---|
34 | send "quit\n"
|
---|
35 |
|
---|
36 | puts "\n\nSUCCESS!\n"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.