[colobot] 156/390: Tools for measuring mission time without opening game window

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:21:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit aa59a229958386e6e62489f746ba946f088c2551
Author: krzys-h <krzys_h at interia.pl>
Date:   Fri Oct 31 21:05:26 2014 +0100

    Tools for measuring mission time without opening game window
---
 tools/mission-time-loop.sh | 5 +++++
 tools/mission-time.sh      | 9 +++++++++
 2 files changed, 14 insertions(+)

diff --git a/tools/mission-time-loop.sh b/tools/mission-time-loop.sh
new file mode 100755
index 0000000..22d6107
--- /dev/null
+++ b/tools/mission-time-loop.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Works like mission-time.sh but execures in a loop
+while [ true ]; do
+	./mission-time.sh $@
+done
diff --git a/tools/mission-time.sh b/tools/mission-time.sh
new file mode 100755
index 0000000..36c65e7
--- /dev/null
+++ b/tools/mission-time.sh
@@ -0,0 +1,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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list