#!/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/iniexample.c ${TDIR}

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

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

# run the iniexample
./iniexample
