1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00
freebsd-ports/net-mgmt/docsis/files/patch-doc_generate-settings.sh
Kyle Evans 5fb9edd6bd Multiple ports: improve regex compliance
These changes largely fall into just two categories:

1. Need textproc/gsed for GNU extensions
2. Extraneous escapes that can go away

For #1, there's a further subdivision into those that require autoconf magic
and those that can get away with BINARY_ALIAS=sed=${LOCALBASE}/bin/gsed.
-CURRENT will soon gain GNU extensions, but these will take longer to get to
all supported releases; we must switch them to gsed to ensure we're actually
properly building them as intended.

For #2, I've fixed these as I can and we should upstream these fixes.

PORTREVISION is bumped for all of the above, because we will almost
certainly build these differently when the replacements actually start
working.

These were all detected by the below-referenced exp-run [1]. The patch
included forbids many ordinary characters from being escaped, since we'll
later imbue those with special meanings. This has had the nice side effect
of picking up various things that we didn't handle properly, e.g. \t and \r
for tab and carriage return.

PR:		229925 [1]
Approved by:	koobs (mentor)
Approved by:	portmgr (blanket: trivial build fixes)
MFH:		no (invasive risk)
Differential Revision:	https://reviews.freebsd.org/D25185
2020-06-08 04:41:31 +00:00

21 lines
674 B
Bash

--- doc/generate-settings.sh.orig 2019-09-25 00:51:22 UTC
+++ doc/generate-settings.sh
@@ -33,13 +33,13 @@ grep -e "^{" ../src/docsis_symtable.h \
| grep -v "*" \
| grep -v "decode_md5" \
| awk '{print $5 "_" $3 " " $7 " " $8 " " $9}' \
- | sed 's/\"//g' \
+ | sed 's/"//g' \
| sed 's/^0,_//g' \
| sed 's/^[0-9]*,_/\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;/g' \
- | sed 's/\decode_//g' \
- | sed 's/\ //g' | tr -s "\(\)" "%%" \
+ | sed 's/decode_//g' \
+ | sed 's/ //g' | tr -s "\(\)" "%%" \
| sed 's/^/<tr><td><b>/g' \
- | sed 's/,\%/<\/b><\/td><td>/g' \
+ | sed 's/,%/<\/b><\/td><td>/g' \
| sed 's/%,/<\/td><td>/g' \
| sed 's/,/-/g' \
| sed 's/$/<\/td><\/tr>/g'\