From f05931e30344befcfc65d88490d79e29afea11e6 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 5 Apr 2023 18:57:52 -0300 Subject: v2: dynamic.mk: Smarter use of xargs+sed over xargs -> sh --- v2/dynamic.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'v2/dynamic.mk') diff --git a/v2/dynamic.mk b/v2/dynamic.mk index 0aa6420..77636db 100644 --- a/v2/dynamic.mk +++ b/v2/dynamic.mk @@ -61,9 +61,9 @@ public-copy-content.sentinel: $(content) public-content-mkdir.sentinel touch $@ public-copy-code-snippets.sentinel: $(all-generated.snippets) public-content-mkdir.sentinel - echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ - awk '{ printf "if [ -s src/content/%s ]; then cp `cat src/content/%s` public/`dirname %s`; fi\n", $$0, $$0, $$0 }' | \ - sh + echo $? | tr ' ' '\n' | grep '^src/content/' | \ + xargs sed 's|^src/content/||' | \ + xargs -P`nproc` -I% cp src/content/% public/% touch $@ public-content-mkdir.sentinel: $(content) $(all-generated.snippets) -- cgit v1.2.3