aboutsummaryrefslogtreecommitdiff
path: root/package/coreutils/coreutils.mk
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-01 17:39:04 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-04-01 22:49:57 +0200
commit225c8aaf27af908ce8a9ef5fb3fde4eb9d0cdc94 (patch)
tree2b389572a18bf49ec8b5bc895a2f5097d425fc45 /package/coreutils/coreutils.mk
parentb3a5ab4c7aeebee21370655e82be5aeeaa84cf28 (diff)
downloadbuildroot-225c8aaf27af908ce8a9ef5fb3fde4eb9d0cdc94.tar.gz
buildroot-225c8aaf27af908ce8a9ef5fb3fde4eb9d0cdc94.tar.bz2
coreutils: rewrite for loop with foreach
This brings up error checking at each iteration of the loop for free, which removes the need for "|| exit 1". Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/coreutils/coreutils.mk')
-rw-r--r--package/coreutils/coreutils.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index 8259f42f4a..8880e77dcc 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -104,9 +104,9 @@ endif
ifeq ($(BR2_ROOTFS_MERGED_USR),)
define COREUTILS_CLEANUP_BIN
# some things go in root rather than usr
- for f in $(COREUTILS_BIN_PROGS); do \
- mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \
- done
+ $(foreach f,$(COREUTILS_BIN_PROGS), \
+ mv -f $(TARGET_DIR)/usr/bin/$(f) $(TARGET_DIR)/bin/$(f)
+ )
endef
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
endif