mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 21:39:03 +02:00
get.sh: make xbmkget() easier to understand
the intent once again is that this for loop shall return, with zero status, if success is observed. otherwise, the loop breaks and an error is thrown. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -85,8 +85,10 @@ xbmkget()
|
||||
echk="f" && [ "$1" = "git" ] && echk="d"
|
||||
|
||||
for url in "$2" "$3"; do
|
||||
[ -n "$url" ] && try_file "$url" "$@" && \
|
||||
eval "[ -$echk \"$4\" ] && return 0"
|
||||
[ -n "$url" ] || continue
|
||||
try_file "$url" "$@" || continue
|
||||
eval "[ -$echk \"$4\" ] || continue"
|
||||
return 0 # successful download/copy
|
||||
done
|
||||
err "$1 $2 $3 $4: not downloaded"; :
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user