#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

# check if the `-c` flag is supported
if script -qc "" /dev/null > /dev/null 2>&1; then
  # use this command if `-c` is supported
  script -qc "$*" $DIR/tests.out
else
  # use this command if `-c` is not supported
  script -q $DIR/tests.out "$@"
fi
