#!/bin/sh
set -e

TEMP=${AUTOPKGTEST_TMP:-${TMPDIR:-/tmp}}
TDIR=$(mktemp -d $TEMP/smokeXXXXXX)

# create temporary directory
mkdir -p ${TDIR}

# copy testfiles
cp -a example/parse.c example/twisted.ini ${TDIR}

# change directory to temporary test directory
cd ${TDIR}

# compile parse.c
gcc -I/usr/include/iniparser -o parse parse.c -liniparser

# run the parse
./parse
