Commit 4171ffe9 by Tom de Vries Committed by Tom de Vries

check_GNU_style.sh: Don't use filename prefix for one patch

2015-05-12  Tom de Vries  <tom@codesourcery.com>

	* check_GNU_style.sh: Don't use a filename prefix if we're only
	processing one patch file.

From-SVN: r223084
parent eb2f4e86
2015-05-12 Tom de Vries <tom@codesourcery.com>
* check_GNU_style.sh: Don't use a filename prefix if we're only
processing one patch file.
2015-05-12 Yury Gribov <y.gribov@samsung.com> 2015-05-12 Yury Gribov <y.gribov@samsung.com>
* mklog: Ignore preprocessor directives. * mklog: Ignore preprocessor directives.
......
...@@ -36,6 +36,8 @@ EOF ...@@ -36,6 +36,8 @@ EOF
} }
test $# -eq 0 && usage test $# -eq 0 && usage
nfiles=$#
files="$*"
inp=check_GNU_style.inp inp=check_GNU_style.inp
tmp=check_GNU_style.tmp tmp=check_GNU_style.tmp
...@@ -44,9 +46,15 @@ tmp=check_GNU_style.tmp ...@@ -44,9 +46,15 @@ tmp=check_GNU_style.tmp
trap "rm -f $inp $tmp" 0 trap "rm -f $inp $tmp" 0
trap "rm -f $inp $tmp ; exit 1" 1 2 3 5 9 13 15 trap "rm -f $inp $tmp ; exit 1" 1 2 3 5 9 13 15
grep -nH '^+' $* \ if [ $nfiles -eq 1 ]; then
| grep -v ':+++' \ # There's no need for the file prefix if we're dealing only with one file.
> $inp format="-n"
else
format="-nH"
fi
grep $format '^+' $files \
| grep -v ':+++' \
> $inp
# Grep # Grep
g (){ g (){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment