summaryrefslogtreecommitdiffstats
path: root/rules/barebox.make
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-03-01 22:22:03 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2015-03-18 15:44:01 +0100
commit3872cfcce083b74f25b0c6fe8c56950a1cad9056 (patch)
tree724c380493247a5c3ac52f340d53eafa7548fddb /rules/barebox.make
parent02c9e42fd85602039ec397b78bca7d8873192a2c (diff)
downloadptxdist-3872cfcce083b74f25b0c6fe8c56950a1cad9056.tar.gz
ptxdist-3872cfcce083b74f25b0c6fe8c56950a1cad9056.tar.xz
barebox: careful handling of wildcard
Some barebox images are not placed into barebox image directory, this will end in a failure of ls with the wildcard expression. Something like: ls: cannot access ..foobar.../barebox-2015.02.0/images/barebox-*.img: No such file or directory This patch will improve the handling with wildcard if no image is found by using find. Signed-off-by: Alexander Aring <alex.aring@gmail.com> [mol: add 'sort' to keep the correct order] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/barebox.make')
-rw-r--r--rules/barebox.make2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/barebox.make b/rules/barebox.make
index 5c596a56f..b518790ae 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -138,7 +138,7 @@ ifdef PTXCONF_BAREBOX_BAREBOXENV
@$(call install_finish, barebox)
endif
@rm -f $(IMAGEDIR)/barebox-image
- @for image in `ls $(BAREBOX_DIR)/images/barebox-*.img`; do \
+ @find $(BAREBOX_DIR)/images/ -name "barebox-*.img" | sort | while read image; do \
install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
if [ ! -e $(IMAGEDIR)/barebox-image ]; then \
ln -sf `basename $$image` $(IMAGEDIR)/barebox-image; \