On Sat, Oct 09, 2010 at 02:35:45AM -0300, Werner Almesberger wrote:
> Alan Post wrote:
> > - @if [ -d "$(2)" -a "$$$$(ls $(2) | wc -l)" -gt 0 ]; then \
> > + @if [ -d "$(2)" -a "$$$$(ls $(2) 2>/dev/null | wc -l)" -gt 0 ]; then \
>
> Why not fix the original logic and use [ X ] && [ Y ] instead of
> [ X -a Y ] ?
>
> - Werner
>
Because it was very late and I was toilet tubing. Here is the
updated patch, tested with a package that has no patches/ directory
and one that does:
<++>
diff --git a/include/quilt.mk b/include/quilt.mk
index 6c4839b..2b27de8 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -39,7 +39,7 @@ define PatchDir/Quilt
endef
define PatchDir/Default
- @if [ -d "$(2)" -a "$$$$(ls $(2) | wc -l)" -gt 0 ]; then \
+ @if [ -d "$(2)" ] && [ "$$$$(ls $(2) | wc -l)" -gt 0 ]; then \
if [ -s "$(2)/series" ]; then \
$(call filter_series,$(2)/series) | xargs -n1 \
$(PATCH) "$(1)" "$(2)"; \
<-->
I've committed this to qi-hw too:
http://qi-hw.com/p/openwrt-xburst/b48d96a
I briefly searched the rest of include for this pattern, but didn't
find any other instances of it.
-Alan
--
.i ko djuno fi le do sevzi
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel