diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-07 21:58:14 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-07 21:58:14 +0100 |
commit | 5c202efea72d9419a722b9be991bf44868a43ca6 (patch) | |
tree | aacc2d3c5ed14c5fc824e8183dad75a05432a7d0 | |
parent | Remove used of unportable \+ in sed script (diff) | |
download | sha3sum-b8c3a856bda835aabd1ff9d176b0ad754c46ae09.tar.gz sha3sum-b8c3a856bda835aabd1ff9d176b0ad754c46ae09.tar.bz2 sha3sum-b8c3a856bda835aabd1ff9d176b0ad754c46ae09.tar.xz |
Fix latest commit and prove portability further by replaceing \s with [[:space:]]1.2.3.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,7 +53,7 @@ $(MAN1): xsum.man algorithm-map set -e; \ f="$$(printf '%s\n' "$@" | sed 's/\.1$$//')"; \ u="$$(printf '%s\n' "$$f" | tr a-z A-Z)"; \ - a="$$(sed -n 's/^'"$$f"'\s*=\s*//p' < algorithm-map | sed 's/\s*$$//')"; \ + a="$$(sed -n 's/^'"$$f"'[[:space:]]*=[[:space:]]*//p' < algorithm-map | sed 's/[[:space:]]*$$//')"; \ if test "$$f" = sha3sum; then \ sed -e "s/xsum/$$f/g" -e "s/XSUM/$$u/g" -e "s/Xsum/$$a/g" -e 's/^\\# ONLY SHA3: //' < xsum.man > $@; \ else \ @@ -103,7 +103,7 @@ $(BIN_SPECIFIC:=.c): +@set -e; \ f="$$(\ set -e; \ - sed -n 's/^\([a-z][a-z0-9-]\+\)%\([^:]*\):.*$$/\1 \2/p' < unportable.mk | while read start end; do \ + sed -n 's/^\([a-z][a-z0-9-]*\)%\([^:]*\):.*$$/\1 \2/p' < unportable.mk | while read start end; do \ end="$$(printf '%s\n' "$$end" | sed 's/\./\\\./g')"; \ x="$$(printf '%s\n' '$@' | sed -n 's/^'"$$start"'\(.*\)'"$$end"'$$/\1/p')"; \ if test -n "$$x"; then \ |