From f6c219703e3e654e60bb341ab4de362a133fdba6 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Fri, 22 Aug 2014 13:01:19 -0400 Subject: all: fix a number of small bugs found by Coverity Also display the build revision to make things easier when submitting builds for scanning. Signed-off-by: Paul Moore --- Makefile.am | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 7fe0787..71fde48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,10 +42,15 @@ endif if COVERITY coverity-tarball: coverity-build - @git rev-parse HEAD &> /dev/null && \ - rev=$$(git rev-parse HEAD | cut -c1-8) || \ - rev=$$(date --iso-8601=date); \ + @if git rev-parse HEAD &> /dev/null; then \ + rev_full=$$(git rev-parse HEAD); \ + rev=$$(echo $$rev_full | cut -c1-8); \ + else \ + rev_full=$$(date --iso-8601=date); \ + rev=$$rev_full; \ + fi; \ tar czf libseccomp-coverity_$$rev.tar.gz cov-int; \ + echo " HEAD revision: $$rev_full"; \ ls -l libseccomp-coverity_$$rev.tar.gz endif -- cgit v1.2.1