#!/bin/bash set -e set -E function cleanup() { dh_autoreconf_clean patch -p1 -R < debian/tests/patches/system-includes.diff } trap cleanup ERR patch -p1 < debian/tests/patches/system-includes.diff dh_autoreconf aclocal && automake dh_auto_configure make -C example check cleanup