#!/bin/bash

if [[ !  -f main ]] ; then
	echo "main does not exist"
	echo "did you compile it?"

	exit 1
fi

# check if plugins.cfg exists, and of not create it
# and modify 
if [[ ! -f plugins.cfg ]] ; then 
	cp plugins.cfg-init plugins.cfg

	is_tardis=`uname -n | grep tardis`
	echo "isTardis: ${is_tardis}"
	if [[ is_tardis  ]] ; then 
		sed -e 's:PLuginFolder=/usr/lib/OGRE:PluginFolder=/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/OGRE/:' plugins.cfg
	fi
fi
exec ./main
