[go: up one dir, main page]

File: mission-time.sh

package info (click to toggle)
colobot 0.1.12-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 416,348 kB
  • sloc: cpp: 138,659; ansic: 3,063; python: 2,115; sh: 205; awk: 91; xml: 32; makefile: 31
file content (9 lines) | stat: -rwxr-xr-x 326 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
#!/bin/bash
# Returns mission time on stdout for a mission given on the commandline
# Make sure the level actually uses MissionTimer, or the script will hang!

colobot -headless -runscene $@ 2>&1 | while read -r line; do
	if [[ $line =~ Mission[[:space:]]time:[[:space:]]([0-9:.]*) ]]; then
		echo ${BASH_REMATCH[1]}
	fi
done