From aa5d8a2b3fe3559db1256b8395561088e4500ba7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 22 Dec 2019 21:17:36 +0100 Subject: [PATCH] package/ebtables: use a foreach make loop instead of a for shell loop make loops are more commonly used in Buildroot, are shorter, and have built-in error handling. Signed-off-by: Thomas Petazzoni --- package/ebtables/ebtables.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk index 7b2264703c..9a975cc7a1 100644 --- a/package/ebtables/ebtables.mk +++ b/package/ebtables/ebtables.mk @@ -23,10 +23,10 @@ define EBTABLES_INSTALL_TARGET_CMDS endef else define EBTABLES_INSTALL_TARGET_CMDS - for so in $(@D)/*.so $(@D)/extensions/*.so; do \ - $(INSTALL) -m 0755 -D $${so} \ - $(TARGET_DIR)/lib/ebtables/`basename $${so}` || exit 1; \ - done + $(foreach so,$(wildcard $(@D)/*.so $(@D)/extensions/*.so), \ + $(INSTALL) -m 0755 -D $(so) \ + $(TARGET_DIR)/lib/ebtables/$(notdir $(so)) + ) $(INSTALL) -m 0755 -D $(@D)/ebtables $(TARGET_DIR)/sbin/ebtables $(INSTALL) -m 0644 -D $(@D)/ethertypes $(TARGET_DIR)/etc/ethertypes endef -- 2.30.2