#!/bin/bash

#
# It has been seen that bibledit crashes when it is started for the first time after rebooting the computer.
# It then exits with a non-zero code.
# It is related to a bug that occurs when gtk is used with threads and with dbus.
# This script runs bibledit, then checks its exit code. 
# If the exit code is non-zero, it runs it again.
# This script is ugly but who cares?
# If this script is not needed on Windows, it can be left out.
#

bibleditgui $@
if test $? -ne 0
    then
      echo Restarting bibledit since it exited with code $?
      bibleditgui $@
fi


