blob: 36c65e71ae943ac4cc44ec85d1fc48b15b0dea70 (
plain)
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
|