Workaround for
bug #144. This workaround had occurred to me a while ago, but wasn't sure if placing them unfairly was better than not placing them at all. Argument for not placing at all is people should probably abort the game when they notice it. Argument for placing unfairly is people can still abort, and if we really wanted them to abort, we should probably just have halted launch if all hogs failed to spawn. This way at least play can continue.
#!/bin/sh
if [ -d QTfrontend ]; then
cd QTfrontend
else
if [ -d ../QTfrontend ]; then
cd ../QTfrontend
else
echo 'abort: Directory "QTfrontend" not found!' >&2
exit 1
fi
fi
if [ -z "$1" ]; then
OUTPUT_DIRECTORY="../doc/QTfrontend"
else
OUTPUT_DIRECTORY="$1"
fi
echo "Creating documentation for Qt-Frontend in $OUTPUT_DIRECTORY ..."
if [ $(which hg) ]; then
branch=$(hg identify -b)
rev=$(hg identify -rdefault -i)
branchurl="<a href=http://code.google.com/p/hedgewars/source/list?name=${branch}>${branch}</a>"
revurl="<a href=http://code.google.com/p/hedgewars/source/detail?r=${rev}>${rev}</a>"
export PROJECT_NUMBER="${branchurl} as of ${revurl}"
export OUTPUT_DIRECTORY
fi
doxygen
exit $?