From a226f5f4169583319aa4265a3426f56287c566f0 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Wed, 22 Jan 2020 20:01:49 +0000 Subject: [PATCH] Fix initialization of CoW source trees As part of creating a CoW source tree, we symlink all top-level paths from the original directory. In commit ebf93035c, we removed a shell glob used for this and replaced it with an invocation of `find`. However, our invocation of `find ... -exec sh -c '... $@ ...' {} \+` is causing the first path in every directory to be skipped, breaking the build. This is because arguments to `sh -c ...` begin with the zeroth argument, while `$@` only returns the first argument onward. Let's fix this by providing an explicit zeroth argument to `sh -c`. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f420b69..52d52f7 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ musl-git-%: %: %.orig rm -rf $@.tmp mkdir $@.tmp - ( cd $@.tmp && find ../$< -path '*/*/*' -prune -exec sh -c 'ln -s "$$@" .' {} + ) + ( cd $@.tmp && find ../$< -path '*/*/*' -prune -exec sh -c 'ln -s "$$@" .' ':' {} + ) test ! -d patches/$@ || cat patches/$@/* | ( cd $@.tmp && $(COWPATCH) -p1 ) test ! -f $