#!/bin/sh

set -e

pkg=bali-phy

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP

bali-phy --version
bali-phy --help

bali-phy sequences/5S-rRNA/5d.fasta --test --seed=0
bali-phy sequences/5S-rRNA/5d.fasta --iter=50 --seed=0
bali-phy sequences/5S-rRNA/5d.fasta --iter=200 -Inone --seed=0
bali-phy sequences/5S-rRNA/5d.fasta --iter=100
bp-analyze 5d-1
