#!/usr/bin/make -f

%:
	dh $@

override_dh_install:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	echo "===> Running tests on pkgos_func"
	./run_tests
	echo "===> Checking scripts"
	set -e ; for i in `ls $(CURDIR)/salsa-scripts/pkgos-salsa-* $(CURDIR)/build-tools/pkgos-* $(CURDIR)/misc/pkgos-* | grep -v misc/pkgos-check-changelog` ; do \
		echo "-> Checking $$i" ; \
		sh -n $$i ; \
	done
	dh_install
endif
