#! /bin/bash

# file: next.sh

# This bash script analyzes the record named in its command-line argument ($1),
# saving the results as an annotation file for the record, with annotator 'qrs'.
# This script is run once for each record in the Challenge test set.

# For example, if invoked as
#    next.sh 100
# it analyzes record 100 using 'gqrs', and saves the results as an annotation
# file named '100.qrs'.

OCTAVE='octave --quiet --no-window-system --eval '
RECORD=$1
RPATH=`pwd`
#STR="${OCTAVE} \"ignore_function_time_stamp('all'); try challenge('$RECORD',0); catch sleep(120*60*60); end_try_catch; quit;\" 2>&1"
STR="${OCTAVE} \"ignore_function_time_stamp('all'); challenge('$RECORD',0); quit;\" 2>&1"
echo "$STR"
eval ${STR}

