#!/bin/bash

if [ $# -gt 0 ]; then

	if [ -f "/usr/lib/mocha/mocha-$1" ]; then

		MOCHA_COMMAND=$1
		shift
		exec "/usr/lib/mocha/mocha-$MOCHA_COMMAND" ${1+"$@"}

	else
	
		echo "mocha: '$1' is not a mocha command. See 'mocha --help'."
	
	fi

else

	echo "usage: mocha $(echo /usr/lib/mocha/mocha-* | sed -e 's/\/usr\/lib\/mocha\/mocha\-//g' -e 's/ /|/g')"

fi
