#!/bin/sh

addwine=/opt/wine

# copy the supplied setup to the users setup
if [ ! -d $HOME/.wine ]; then
	mkdir -p $HOME/.wine/dosdevices
	cp -d /opt/chess/share/wine/dosdevices/* $HOME/.wine/dosdevices/
	cp -d /opt/chess/share/wine/config       $HOME/.wine/
	cp -d /opt/chess/share/wine/*.reg        $HOME/.wine/
fi


if [ ! `which wine` ] && [ -d /opt/wine ]; then
	export PATH=$addwine/bin:$PATH
	export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$addwine/lib:$addwine/lib/wine
fi

