#!/bin/bash
set -e

pkg=mipe

export LC_ALL=C.UTF-8
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}"


mipe0_9to1_0 template.mipe > mipe0_9
echo "6292e7feaa902e9dab6c8401d780ff06  mipe0_9" >> checksums

mipe2pcroverview template.mipe > mipepcr
echo "10632740119ff60721a50ded8a375209  mipepcr" >> checksums

mipe06to07 template.mipe > mipe06
echo "2878e5c422cd82574df7f75e0182eea4  mipe06" >> checksums

mipe2snps template.mipe > snp.csv
echo "1d1d78f1a3aba3bb354ef336bb4996e6  snp.csv" >> checksums

mipe2pcrprimers template.mipe > primers
echo "bc64141b33d3026b6d8c421ba4d779e5  primers" >> checksums

md5sum --check checksums


