aboutsummaryrefslogtreecommitdiff
path: root/v2/dynamic.mk
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-05 17:16:22 -0300
committerEuAndreh <eu@euandre.org>2023-04-05 17:16:22 -0300
commit33cbe34f900033c8b69914bd8b84adbf79daf810 (patch)
tree16d3589139367fcd708e9d954ef19a9160062339 /v2/dynamic.mk
parentv2: src/bin/feed: Omit expected error (diff)
downloadeuandre.org-33cbe34f900033c8b69914bd8b84adbf79daf810.tar.gz
euandre.org-33cbe34f900033c8b69914bd8b84adbf79daf810.tar.xz
v2: dynamic.mk: Conditionally copy snippets, only when they exist
Diffstat (limited to 'v2/dynamic.mk')
-rw-r--r--v2/dynamic.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/v2/dynamic.mk b/v2/dynamic.mk
index 768ba30..0aa6420 100644
--- a/v2/dynamic.mk
+++ b/v2/dynamic.mk
@@ -62,7 +62,7 @@ public-copy-content.sentinel: $(content) public-content-mkdir.sentinel
public-copy-code-snippets.sentinel: $(all-generated.snippets) public-content-mkdir.sentinel
echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \
- awk '{ printf "cp `cat src/content/%s` public/`dirname %s`\n", $$0, $$0 }' | \
+ awk '{ printf "if [ -s src/content/%s ]; then cp `cat src/content/%s` public/`dirname %s`; fi\n", $$0, $$0, $$0 }' | \
sh
touch $@