2022-04-16 18:00:10 +00:00
|
|
|
#! /bin/bash
|
|
|
|
OLDCWD=`pwd`
|
|
|
|
SCRIPT_PATH=`dirname $0`
|
2022-04-17 15:12:52 +00:00
|
|
|
CHECK_PATH=.
|
|
|
|
|
2022-04-16 18:00:10 +00:00
|
|
|
cd $SCRIPT_PATH/../../
|
|
|
|
|
|
|
|
nl='
|
|
|
|
'
|
|
|
|
nl=$'\n'
|
2022-04-17 19:08:42 +00:00
|
|
|
r1="${nl}$"
|
2022-04-17 18:47:19 +00:00
|
|
|
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.asm -o -name \*.sgml \) -print | while read f; do
|
2022-04-17 19:08:42 +00:00
|
|
|
t=$(tail -c2 $f; printf x)
|
2022-04-16 18:00:10 +00:00
|
|
|
[[ ${t%x} =~ $r1 ]] || echo "$f"
|
|
|
|
done`
|
|
|
|
|
|
|
|
cd $OLDCWD
|
|
|
|
|
|
|
|
if [ x"$FILES"x != xx ]; then
|
|
|
|
echo "error: found following files that have no newline at the end:"
|
|
|
|
for n in $FILES; do
|
|
|
|
echo $n
|
|
|
|
done
|
|
|
|
exit -1
|
|
|
|
fi
|