#!/bin/sh
SCRIPT_DIR=$(dirname $(realpath $0))
PROJECT_DIR=$(dirname $SCRIPT_DIR)

ruby -v >/dev/null 2>&1
if [ "$?" = 0 ]; then
	exec $PROJECT_DIR/sbin/cci.rb $*
fi

usage()
{
	cat <<-EOF
	Usage: cci command [option]
	command:
	return           return current testbox right now
	lkp-renew        prolong the service time of the testbox
	EOF
	exit
}

if [ "$#" = 0 ]; then
      usage
fi

command=$1
shift
exec $PROJECT_DIR/sbin/$command "$@"
