Parcourir la source

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 il y a 5 ans
Parent
commit
ebf93035c6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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 $@