From cad2917baf6e8d90720f5bfb2463dfa7be35f568 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 12 Aug 2020 15:49:10 +0000 Subject: [PATCH] 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. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D26036 --- 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 75efeceab26..714adba6c9c 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 <