diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-05-19 23:07:01 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-05-19 23:07:01 +0100 | 
| commit | cdc0fb49e1c47a013ea99117acbf62e96ec5c652 (patch) | |
| tree | c08d1a6c66ab80d29b0b6ca56130abe960ada7ad /include/get.sh | |
| parent | 620c1dd6fae0f0f83212e9f6b6fb27c1faf67b83 (diff) | |
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>
Diffstat (limited to 'include/get.sh')
| -rw-r--r-- | include/get.sh | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/include/get.sh b/include/get.sh index ab6ff401..89859454 100644 --- a/include/get.sh +++ b/include/get.sh @@ -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"; :  } | 
