#!/bin/bash
set -e

pkg="seaview"

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi

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

cd $AUTOPKGTEST_TMP

gunzip *.gz

seaview -build_tree -distance K2P -o tree.ph example.nxs

# This requires PDF support
# seaview -plotonly -svg tree.ph

echo "PASS"
