source: scripts/usr/local/lib/7dtd/steamcmd.exp@ 501

Last change on this file since 501 was 479, checked in by alloc, 13 months ago

Scripts

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