From acf3fe802809565989305b71423f7b1ad130db85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 14 Jan 2021 19:43:52 +0000 Subject: [PATCH] Fix incorrect bash globbing. --- rootfs.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rootfs.sh b/rootfs.sh index 53ad010e..54aa75ed 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -107,9 +107,11 @@ get_file() { else bname=$(basename "$url" ".tar.${ext}") fi - if [ -f "${bname}."* ]; then - cp "${bname}."* tmp/after - fi + for file in "${bname}."*; do + if [ -f "${file}" ]; then + cp "${file}" tmp/after + fi + done cp "../sources/$(basename "$url")" tmp/after }