Skip to content

Commit 31f652f

Browse files
committed
CI script: Also check last line of file if there is no newline
1 parent 48d8956 commit 31f652f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

check-file-format.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ done
2222
#See if the lines a. have a '| desc' bit that is not zero, and if they
2323
#start with the next PID in order.
2424
pid=$(($2))
25-
while read l <&6; do
25+
# https://stackoverflow.com/questions/4165135/how-to-use-while-read-bash-to-read-the-last-line-in-a-file-if-there-s-no-new
26+
DONE=false
27+
until $DONE; do
28+
read l <&6 || DONE=true
2629
if [ -n "$l" ]; then
2730
#Split the line into pid and desc
2831
rpid="${l% |*}"

0 commit comments

Comments
 (0)