#!/bin/sh -e
#  That way the test data were fetched
#SERVER=www.pdb.org
#entries="1sp1 1sp2 3znf"
#
#pdb_fetch () {
#  for n in $* ; do
#      wget -nv http://${SERVER}/pdb/files/$n.pdb.gz
#  done
#}

# The process will run in this directory:
pkg=mustang
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
fi
cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/examples/* .
find . -name "*.gz" -exec gunzip \{\} \;

# Stupidly the downloaded data files need to be copied to /tmp/mustang
mkdir -p /tmp/mustang
mv [13]*.pdb /tmp/mustang

mustang -f ./test_zf-CCHH-small

echo Results are in $AUTOPKGTEST_TMP/results.html and $AUTOPKGTEST_TMP/results.pdb

# rm -f $AUTOPKGTEST_TMP/*
