git: 8564660237ae - main - newvers.sh: add newline at EOF in generated vers.c

Ed Maste emaste at FreeBSD.org
Mon Jan 25 19:57:39 UTC 2021


The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=8564660237aec4c679e8b607dbbf861c90fafc4c

commit 8564660237aec4c679e8b607dbbf861c90fafc4c
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-01-25 19:53:47 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-01-25 19:57:18 +0000

    newvers.sh: add newline at EOF in generated vers.c
    
    Previously we omitted the newline, which did not cause a functional
    issue for the build but resulted in suboptimal output from e.g.
    `cat vers.c`.
---
 sys/conf/newvers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 605e61181dec..497ea44cdd64 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -311,7 +311,7 @@ EOF
 )
 vers_content_old=$(cat vers.c 2>/dev/null || true)
 if [ "$vers_content_new" != "$vers_content_old" ]; then
-	printf "%s" "$vers_content_new" > vers.c
+	printf "%s\n" "$vers_content_new" > vers.c
 fi
 
 echo $((v + 1)) > version


More information about the dev-commits-src-all mailing list