浏览代码

make initialization of cow source trees robust

shell glob of ../$</* fails to catch filenames beginning with dot, and
the easy mitigations for that all produce bad results on non-match.
use find to do it robustly.
Rich Felker 5 年之前
父节点
当前提交
ebf93035c6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -129,7 +129,7 @@ musl-git-%:
 %: %.orig
 	rm -rf $@.tmp
 	mkdir $@.tmp
-	( cd $@.tmp && ln -s ../$</* . )
+	( cd $@.tmp && find ../$< -path '*/*/*' -prune -exec sh -c 'ln -s "$$@" .' {} + )
 	test ! -d patches/$@ || cat patches/$@/* | ( cd $@.tmp && $(COWPATCH) -p1 )
 	test ! -f $</config.sub || ( rm -f $@.tmp/config.sub && cp -f $(SOURCES)/config.sub $@.tmp/ )
 	mv $@.tmp $@