#!/bin/sh

# Install user settings directory if it does not exist
if [ ! -d ${HOME}/.xsim ]
then
       mkdir ${HOME}/.xsim
       cp /usr/local/share/xsim/dat/* ${HOME}/.xsim/
       sed "/^DICT_LOCAL/s|/usr/local/share/xsim/dat|${HOME}/.xsim|g" \
               /usr/local/etc/xsimrc > ${HOME}/.xsim/xsimrc
fi

# Start xsim
exec /usr/local/share/xsim/bin/xsim $*
