summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-levels.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/check-levels.sh b/tools/check-levels.sh
index 22544fb..127375f 100755
--- a/tools/check-levels.sh
+++ b/tools/check-levels.sh
@@ -2,8 +2,18 @@
# Runs every level in scenetest mode
-levels=`ls /usr/local/share/games/colobot/levels | cut -d "." -f 1`
-for level in $levels; do
- echo $level
- colobot -runscene $level -scenetest -loglevel warn
+categories=`ls /usr/local/share/games/colobot/levels`
+for category in $categories; do
+ if [ "$category" = "other" ]; then continue; fi
+ chapters=`ls /usr/local/share/games/colobot/levels/$category`
+ for chapter in $chapters; do
+ chapter=`echo -n $chapter | tail -c 1`
+ levels=`ls /usr/local/share/games/colobot/levels/$category/chapter00$chapter`
+ for level in $levels; do
+ if [ ! -d /usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; then continue; fi
+ level=`echo -n $level | cut -d . -f 1 | tail -c 3`
+ echo $category$chapter$level
+ colobot -runscene $category$chapter$level -scenetest -loglevel warn
+ done
+ done
done