#!/bin/sh -e

export LC_ALL=C.UTF-8

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

cp -a images/* $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP

for testfile in *.png; do
    img2sixel $testfile -o ${testfile}.sixel
done

for testfile in *.jpg; do
    img2sixel $testfile -o ${testfile}.sixel
done

for testfile in *.six; do
    sixel2png -i $testfile -o ${testfile}.png
done
