From a4e1cf9a0a62bddcc660ae339062e047b8ddf21c Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 17 Apr 2022 15:08:42 -0400 Subject: [PATCH] Moved a constant expression out of a loop. --- .github/checks/lastline.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/checks/lastline.sh b/.github/checks/lastline.sh index 797b6acfd..406814ff4 100755 --- a/.github/checks/lastline.sh +++ b/.github/checks/lastline.sh @@ -8,8 +8,9 @@ cd $SCRIPT_PATH/../../ nl=' ' nl=$'\n' +r1="${nl}$" 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 - t=$(tail -c2 $f; printf x); r1="${nl}$"; + t=$(tail -c2 $f; printf x) [[ ${t%x} =~ $r1 ]] || echo "$f" done`