Skip to content

Commit

Permalink
CI script: Also check last line of file if there is no newline
Browse files Browse the repository at this point in the history
  • Loading branch information
Spritetm committed Jun 4, 2024
1 parent 48d8956 commit 31f652f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion check-file-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ done
#See if the lines a. have a '| desc' bit that is not zero, and if they
#start with the next PID in order.
pid=$(($2))
while read l <&6; do
# https://stackoverflow.com/questions/4165135/how-to-use-while-read-bash-to-read-the-last-line-in-a-file-if-there-s-no-new
DONE=false
until $DONE; do
read l <&6 || DONE=true
if [ -n "$l" ]; then
#Split the line into pid and desc
rpid="${l% |*}"
Expand Down

0 comments on commit 31f652f

Please sign in to comment.