git: 680867cb7029 - stable/13 - newvers.sh: add newline at EOF in generated vers.c

Ed Maste emaste at FreeBSD.org
Fri Mar 5 17:48:58 UTC 2021


The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=680867cb7029cf60a401603794e202c588172dd1

commit 680867cb7029cf60a401603794e202c588172dd1
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-01-25 19:53:47 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-03-05 17:46:12 +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`.
    
    (cherry picked from commit 8564660237aec4c679e8b607dbbf861c90fafc4c)
---
 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 0b5b76847320..acbebbd780b7 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