#!/bin/sh
#
# Run a test of the Poset Conjecture on some class of posets
#
# Calling sequence: runtest [all|nar] [nat|lab] [e|o] n
# Example: runtest nar nat e 6
#
# Arguments:
#   [all|nar] all (connected) posets or narrow posets only
#   [nat|lab] natural labelings or all labelings
#     [e|o]   enriched or ordinary W-polynomials
#       n     selects the number of vertices
#
# This script launches maple in quiet mode, with output results
# written to a file in the directory you specify ($HOME by default).
#
MAPLE=/usr/local/bin/maple
OUTPUTDIR=$HOME

# shouldn't need to modify below this line

FILE=test_${1}_${2}_${3}

OUTFILE="\`"${OUTPUTDIR}/${FILE}_${4}.out"\`"

OPTS="n:="${4}"; writeto("
OPTS=${OPTS}${OUTFILE}"); testall(n); writeto(terminal); quit;"

echo $OPTS | cat $FILE - | $MAPLE -q > /dev/null

