mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 17:33:17 +00:00

Though given 00d87f8fe4078ffd84fcdc0d73fcc2104efef1e7 I would say this is better than nothing. (cherry-picked from commit 33ad6be326c234b173d680ce34589464f88f8418)
13 lines
524 B
Bash
Executable File
13 lines
524 B
Bash
Executable File
#!/bin/bash
|
|
gdb -q -batch -return-child-result -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> error.log
|
|
error_code="$?"
|
|
while grep -q 'Could not initialize SDL_video' error.log; do
|
|
echo "Could not initialize SDL_video error, retrying..."
|
|
gdb -q -batch -return-child-result -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth -m --controller 1:ai --controller 2:ai --nogui 2> error.log
|
|
error_code="$?"
|
|
done
|
|
cat error.log
|
|
|
|
exit $error_code
|
|
|