Module Name:    src
Committed By:   christos
Date:           Mon Oct 14 17:01:18 UTC 2024

Modified Files:
        src/sys/conf: newvers_stand.sh

Log Message:
use TOOL_AWK and quote.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/conf/newvers_stand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/newvers_stand.sh
diff -u src/sys/conf/newvers_stand.sh:1.10 src/sys/conf/newvers_stand.sh:1.11
--- src/sys/conf/newvers_stand.sh:1.10	Tue Apr  2 10:15:19 2024
+++ src/sys/conf/newvers_stand.sh	Mon Oct 14 13:01:18 2024
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $NetBSD: newvers_stand.sh,v 1.10 2024/04/02 14:15:19 christos Exp $
+# $NetBSD: newvers_stand.sh,v 1.11 2024/10/14 17:01:18 christos Exp $
 #
 # Copyright (c) 2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,6 +36,7 @@
 #	sh ${S}/conf/newvers_stand.sh [-dkn] [-D <date>] [-m <machine>] VERSION_TEMPLATE [EXTRA_MSG]
 
 DATE=${TOOL_DATE:-date}
+AWK=${TOOL_AWK:-awk}
 
 cwd=$(dirname "$0")
 
@@ -60,9 +61,9 @@ done
 
 shift $(expr ${OPTIND} - 1)
 
-r=$(awk -F: '$1 ~ /^[0-9.]*$/ { it = $1; } END { print it }' "$1")
+r=$("${AWK}" -F: '$1 ~ /^[0-9.]*$/ { it = $1; } END { print it }' "$1")
 shift
-t=$(LC_ALL=C TZ=UTC ${DATE} ${dateargs})
+t=$(LC_ALL=C TZ=UTC "${DATE}" ${dateargs})
 
 if ${add_date}; then
 	echo "const char bootprog_rev[] = \"${r} (${t})\";" > vers.c

Reply via email to