summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-19 22:59:20 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-19 22:59:20 +0100
commit620c1dd6fae0f0f83212e9f6b6fb27c1faf67b83 (patch)
tree6f5b6fdbaf899a4c244bc668a7da99758c99b09d /include
parent900da04efa929a9373d5a6f3f56f8b8ac8f193df (diff)
get.sh: Make xbmkget err on exiting the loop check
The idea in this function is that if a file or repo is successfully handled, a return will be performed from the loop. If the loop exits for any reason, an error is thrown. The current code is probably fine, but I can forsee future modifications possibly causing bugs here. Make it unambiguous, by always throwing an error if execution reaches the end of the function. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/get.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/get.sh b/include/get.sh
index 667ab398..ab6ff401 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -87,7 +87,8 @@ xbmkget()
for url in "$2" "$3"; do
[ -n "$url" ] && try_file "$url" "$@" && \
eval "[ -$echk \"$4\" ] && return 0"
- done && err "$1 $2 $3 $4: not downloaded"; :
+ done
+ err "$1 $2 $3 $4: not downloaded"; :
}
try_file()