#!/bin/bash

# Including wrapper script:
. /usr/lib/java-wrappers/java-wrappers.sh

# We need either icedtea or Sun 6, for now
find_java_runtime icedtea sun6

find_jars higlayout wstx-lgpl freecol

# We test if LC_MESSAGES is different from LC_CTYPE, if that is the case,
# we pass to freecol the --default-locale argument
if [ "$LC_CTYPE" != "$LC_MESSAGES" -a "$LC_MESSAGES" ]; then
    lang_argument="--default-locale=$LC_MESSAGES"
fi

run_java -Xmx180M net.sf.freecol.FreeCol --freecol-data \
    /usr/share/games/freecol $lang_argument "$@"
