From 7954a48776add805bded8549e38c45785c5ab2ea Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Mon, 21 Sep 2009 16:28:53 +0200 Subject: Misc enhancements to sample lintian hook examples/B90lintian: Run lintian as pbuilder and not root and show how to not fail the build if lintian fails. --- examples/B90lintian | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/B90lintian b/examples/B90lintian index 57fcfc4..f2c692f 100644 --- a/examples/B90lintian +++ b/examples/B90lintian @@ -1,6 +1,18 @@ -#!/bin/bash -# example file to be used with --hookdir -# -# run lintian on generated deb files -apt-get install -y --force-yes lintian -lintian /tmp/buildd/*.deb +#!/bin/sh + +set -e + +install_packages() { + apt-get -y --force-yes install "$@" +} + +install_packages lintian + +echo "+++ lintian output +++" + +su -c "lintian -I --show-overrides /tmp/buildd/*.changes" - pbuilder +# use this version if you don't want lintian to fail the build +#su -c "lintian -I --show-overrides /tmp/buildd/*.changes; :" - pbuilder + +echo "+++ end of lintian output +++" + -- cgit v1.2.3