mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
tree.sh: fix up copy_elf(), bad for loop
Because of how sh works, having just the [] line causes sh to exit, annoyingly without an error message, but it does cause a non-zero exit. This bug will have already been triggering, before I added the recent error handling on files for this for loop. also do it to the other loop in lib.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ fx_()
|
||||
dx_()
|
||||
{
|
||||
[ ! -f "$2" ] || while read -r fx; do
|
||||
$1 "$fx" || return 1
|
||||
$1 "$fx" || return 1; :
|
||||
done < "$2" || err "dx_ $*: cannot read '$2'"; :
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -334,7 +334,7 @@ copy_elf()
|
||||
{
|
||||
[ -f "$listfile" ] && x_ mkdir -p "$dest_dir"
|
||||
[ ! -f "$listfile" ] || while read -r f; do
|
||||
[ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir"
|
||||
done < "$listfile" || err "copy_elf $*: cannot read '$listfile'"
|
||||
[ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir"; :
|
||||
done < "$listfile" || err "copy_elf $*: cannot read '$listfile'"; :
|
||||
x_ make clean -C "$srcdir" $cleanargs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user