#!/bin/sh
#
# Compile and run examples/hello/hello.c to validate headers and
# libraries are properly set up.

# cd $AUTOPKGTEST_TMP

cd examples/hello/

LIBS="$(pkg-config --libs duktape)"
if cc -o hello hello.c $LIBS; then
    echo success: building examples/hello/hello.c succeeded
    echo running hello...
    ./hello
    echo success: running hello succeeded
else
    echo error: building and running examples/hello/hello.c failed
    exit 1
fi

rm -f hello
