]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/xonotic-map-screenshot
Avoid using nested quotes in the map screenshot script
[xonotic/xonotic.git] / misc / tools / xonotic-map-screenshot
1 #!/bin/sh
2
3 map=$1; shift
4 count=$1; shift
5 watchdog=$1; shift
6 dummy=$1; shift
7
8 # convert count to unary
9 count=`yes x | head -n "$count" | tr -cd x`
10
11 ./all run \
12         -nocrashdialog \
13         -nosound \
14         -noconfig \
15         +'locksession 0' \
16         +'scr_screenshot_timestamp 0' \
17         +'vid_fullscreen 0' \
18         +'exec effects-ultra.cfg' \
19         "$@" \
20         +'sv_precacheplayermodels 0' \
21         +'cl_hidewaypoints 1' \
22         +'cl_movement 0' \
23         +'r_motionblur 0' \
24         +'r_damageblur 0' \
25         +'r_letterbox -1' \
26         +'r_drawviewmodel 0' \
27         +'crosshair 0' \
28         +'sv_cheats 2' \
29         +'sv_gravity 0' \
30         +'r_nolerp 1' \
31         +'sv_clientcommand_antispam_time -999' \
32         +'sv_clientcommand_antispam_count 999' \
33         +'set catchme "catchme_"' \
34         +"alias catchme_$count quit" \
35         +'alias NARF "sv_cmd nextframe cl_cmd nextframe sv_cmd nextframe cl_cmd nextframe $*"' \
36         +'alias ZORT "god; NARF EGAD"' \
37         +'alias EGAD "noclip; NARF POIT"' \
38         +'alias POIT "$catchme; set catchme ${catchme}x; impulse 911; NARF TROZ"' \
39         +'alias TROZ "screenshot; NARF POIT"' \
40         +'alias cl_hook_gamestart_all "defer 1.1 join; defer 2 ZORT"' \
41         +"defer \"$watchdog\" quit" \
42         +"map \"$map\"" \
43         +'timelimit 0' \
44         +'fraglimit 0' \
45         </dev/null