#!/bin/bash

if [ ! -e "./rtl" ]; then
    print "error: missing rtl executable"
    exit 1
fi

if [ ! -x "./rtl" ]; then
    print "error: rtl is not executable by user"
    exit 1
fi

LOG_DIR="./log"

if [ ! -d "./log" ]; then
    LOG_DIR="./"
fi

#$PLTPATH/rtl/bin/rtl_check.py --bin=""$PLTPATH/trl/bin"" --tests=""$PLTPATH/trl/tests"" --log=""$PLTPATH/trl/log"" $*
./rtl_check.py --tests=""./tests"" --log=""$LOG_DIR"" $*
