#!/bin/bash
set -e

pkg=fastlink

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}"

unknown
echo "95dc2997370f4f76928fd79e09a10a50  ipedfile.dat" >> checksums
echo "30944ffa33e66c2923c1cd1d78112ec8  loopfile.dat" >> checksums
echo "d8e8c1a3795eb42b23de343d992b1f7b  newspeedfile.dat" >> checksums
echo "8e461242dc9ebce4ff855790e1b2d349  speedfile.dat" >> checksums

mlink > linkage
echo "7c26709e720f8232a5e204ff1b97e067  linkage" >> checksums 

linkmap > map 
echo "8040c09d668a567ca1bc85ea8f10a67f  map" >> checksums

lodscore > score
sed -i '3,18!d' score
echo "b20aea5b69fbf609153f1bcf427def36  score" >> checksums 

md5sum --check checksums 
 
