mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
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>
This commit is contained in:
parent
b3a5ab4c7a
commit
225c8aaf27
@ -104,9 +104,9 @@ endif
|
|||||||
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
||||||
define COREUTILS_CLEANUP_BIN
|
define COREUTILS_CLEANUP_BIN
|
||||||
# some things go in root rather than usr
|
# some things go in root rather than usr
|
||||||
for f in $(COREUTILS_BIN_PROGS); do \
|
$(foreach f,$(COREUTILS_BIN_PROGS), \
|
||||||
mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \
|
mv -f $(TARGET_DIR)/usr/bin/$(f) $(TARGET_DIR)/bin/$(f)
|
||||||
done
|
)
|
||||||
endef
|
endef
|
||||||
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
|
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user