The branch stable/12 has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1b6c96c6034a71662bf4ffcd4d79489e5526afd6

commit 1b6c96c6034a71662bf4ffcd4d79489e5526afd6
Author:     Alex Richardson <[email protected]>
AuthorDate: 2020-08-12 15:49:10 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2021-10-08 01:15:59 +0000

    Fix stand/newvers.sh with zsh in sh mode
    
    When building on macOS with sh==zsh, newvers.sh was producing an
    unterminated string literal due to \\n being turned as a newline. Fix this
    by using a here document instead.
    
    (cherry picked from commit cad2917baf6e8d90720f5bfb2463dfa7be35f568)
---
 stand/common/newvers.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh
index 75efeceab26b..714adba6c9cb 100755
--- a/stand/common/newvers.sh
+++ b/stand/common/newvers.sh
@@ -55,6 +55,8 @@ if [ -n "${include_metadata}" ]; then
        bootprog_info="$bootprog_info(${t} ${u}@${h})\\n"
 fi
 
-echo "char bootprog_info[] = \"$bootprog_info\";" > $tempfile
-echo "unsigned bootprog_rev = ${r%%.*}${r##*.};" >> $tempfile
+cat > $tempfile <<EOF
+char bootprog_info[] = "$bootprog_info";
+unsigned bootprog_rev = ${r%%.*}${r##*.};
+EOF
 mv $tempfile vers.c

Reply via email to