git: 2c19beeed231 - main - newvers: Use correct regexp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Apr 2023 16:33:13 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c19beeed2312e5b19b073532ef708d64255a1e3 commit 2c19beeed2312e5b19b073532ef708d64255a1e3 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-04-21 16:14:41 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-04-21 16:24:25 +0000 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 --- 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 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)