#!/bin/bash
#This script should not be launched unless sandbox installed in /usr/local/sandbox 
# SANDBOX_DIR should refer to the directory in which sandbox is placed.
#SANDBOX_DIR=~/sandbox
SANDBOX_DIR=/usr/local/sandbox
HOME_DIR=${HOME}/.platinumarts

#SANDBOX_OPTIONS="-r"
SANDBOX_OPTIONS="-q${HOME_DIR} -r -k${HOME_DIR}/data -k${HOME_DIR}/packages/music"
#The -k's add two folders in the user's home as package dirs, just so he can make replacements for the contents on his side, easier

if [ -x ${SANDBOX_DIR}/bin/sandbox_client ]
then
	cd ${SANDBOX_DIR}
	exec ./bin/sandbox_client ${SANDBOX_OPTIONS} $*
else
	echo "A problem was encountered, please check which of the following it is."
	echo "1) the executable was moved"
	echo "2) There isn't an executable"
	echo "3) There's an executable present, but has incorrect permissions (needs rwxr-xr-x or similar)"
	exit 1
fi
