#!/bin/bash
function print_usage() {
echo "Usage: ./report.sh <filename> <nexp> <lang> <optional: time period in days>"
}
if [[ "$#" -lt 3 ]]; then
print_usage
exit 1
fi
DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${DIR}/bin/activate
if [[ "$#" -eq 3 ]]; then
python3 ${DIR}/report.py -f $1 -n $2 -l $3
elif [[ "$#" -eq 4 ]]; then
python3 ${DIR}/report.py -f $1 -n $2 -l $3 -d $4
else
print_usage
exit 1
fi