aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-04-21 16:14:41 +0000
committerWarner Losh <imp@FreeBSD.org>2023-04-21 16:24:25 +0000
commit2c19beeed2312e5b19b073532ef708d64255a1e3 (patch)
tree68fc140408634018d7c4bbd05da656df91b9f18e
parent92fa22c6a5c41303e3ad98096c9ebe8202418d81 (diff)
downloadsrc-2c19beeed2312e5b19b073532ef708d64255a1e3.tar.gz
src-2c19beeed2312e5b19b073532ef708d64255a1e3.zip
newvers: Use correct regexp
There's no need to quote the # here. Inside of regexp, it's not treated like a comment from an awk perspective. And inside if '' it's not treated as special by the shell. gawk also warns. Sponsored by: Netflix
-rw-r--r--sys/conf/newvers.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index f3c437269026..85346b1cdc29 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -65,7 +65,7 @@ if [ -z "${SYSDIR}" ]; then
SYSDIR=$(dirname $0)/..
fi
-RELDATE=$(awk '/^\#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})
+RELDATE=$(awk '/^#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h})
if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)