From 8cab7c1398a6275c0b8e4132f3c2d1e22181c00b Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Fri, 17 Sep 2010 19:09:47 +0000 Subject: [PATCH] Do not print warning messages when there are no occurences. 2010-07-02 Sebastian Pop * check_GNU_style.sh: Do not print warning messages when there are no occurences. From-SVN: r164378 --- contrib/ChangeLog | 5 +++++ contrib/check_GNU_style.sh | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 26c446c..000d274 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2010-07-02 Sebastian Pop + + * check_GNU_style.sh: Do not print warning messages when there are + no occurences. + 2010-09-13 Rainer Orth * gcc_update: Handle hg, too. diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index 6396417..8fb579f 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -84,8 +84,11 @@ col (){ | grep -v ':+++' \ | cut -f 2 -d '+' \ | awk '{ if (length ($0) > 80) print $0 }' \ - > $tmp && printf "\n$msg\n" - cat $tmp + > $tmp + if [ -s $tmp ]; then + printf "\n$msg\n" + cat $tmp + fi } col 'Lines should not exceed 80 characters.' $* -- 2.7.4