aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-07 21:58:14 +0100
committerMattias Andrée <maandree@kth.se>2023-12-07 21:58:14 +0100
commit5c202efea72d9419a722b9be991bf44868a43ca6 (patch)
treeaacc2d3c5ed14c5fc824e8183dad75a05432a7d0 /Makefile
parentRemove used of unportable \+ in sed script (diff)
downloadsha3sum-5c202efea72d9419a722b9be991bf44868a43ca6.tar.gz
sha3sum-5c202efea72d9419a722b9be991bf44868a43ca6.tar.bz2
sha3sum-5c202efea72d9419a722b9be991bf44868a43ca6.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--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a4fdd34..bcd7f66 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \