summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-15 23:01:45 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-15 23:15:27 +0100
commit0812d532123b5a039b0bf674393f06eb17f72854 (patch)
treebba0b1f9a4a15df3fa922b3555d313d4a047c51a /script
parent331c4097ff05bb2b62a88a42d350221ec4e35ebc (diff)
trees: simplify copy_elf()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/trees6
1 files changed, 1 insertions, 5 deletions
diff --git a/script/trees b/script/trees
index d9111eb6..5f80c344 100755
--- a/script/trees
+++ b/script/trees
@@ -293,11 +293,7 @@ mkpayload_grub()
copy_elf()
{
- [ -f "$listfile" ] || return 0
-
- x_ mkdir -p "$dest_dir"
-
- while read -r f; do
+ [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" && while read -r f; do
[ -f "$cdir/$f" ] && x_ cp "$cdir/$f" "$dest_dir"
done < "$listfile"
x_ make clean -C "$cdir"