Skip to content

Commit a8e3fa9

Browse files
author
Ian Campbell
committed
Portable sed expression for make update-hashes
While #55 fixed the issue with `xargs` it did not fix the `sed` expression to work on MacOS. Do so by enabling extended regular expressions (`-E`) and adjusting the expression, this now works on both Linux (GNU sed 4.4) and on MacOS (system `sed` from FreeBSD). This properly fixes #52. Signed-off-by: Ian Campbell <ijc@docker.com>
1 parent 22280f1 commit a8e3fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ update-hashes:
3232
$$(linuxkit pkg show-tag pkg/kubernetes-docker-image-cache-common) \
3333
$$(linuxkit pkg show-tag pkg/kubernetes-docker-image-cache-control-plane) ; do \
3434
image=$${tag%:*} ; \
35-
sed -i.bak -e "s,$$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$$tag,g" yml/*.yml ; \
35+
sed -E -i.bak -e "s,$$image:[[:xdigit:]]{40}(-dirty)?,$$tag,g" yml/*.yml ; \
3636
done
3737

3838
.PHONY: clean

0 commit comments

Comments
 (0)