summaryrefslogtreecommitdiffstats
path: root/debian/tests/build-and-run-examples
blob: 61457190017320a1a35c6dbaa3f8b0e90f0d0ed3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

if [ -d "$AUTOPKGTEST_ARTIFACTS" ]; then
    cd "$AUTOPKGTEST_ARTIFACTS"
fi

for x in /usr/share/doc/librnp-dev/examples/*.c; do
    bin="$(basename "$x" .c)"
    printf 'building %s\n' "$bin"
    gcc -g -O2 -Werror -Wall -pedantic -o "$bin" "$x" $(pkg-config --cflags --libs librnp)
done 

for x in generate encrypt decrypt sign verify; do
    printf '**** %s ****\n' "$x"
    "./$x"
done