get.sh: stricter URL check in xbmkget()

don't skip if the URL is empty. throw an error instead.

i decree that all links must be properly initialised, because
that is the design of lbmk. where only one link is provided,
such as in a local copy operation, the second would succeed no
better than the first so two identical paths are given.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-19 23:09:37 +01:00
parent cdc0fb49e1
commit f15bb8153a
+1 -1
View File
@@ -85,7 +85,7 @@ xbmkget()
echk="f" && [ "$1" = "git" ] && echk="d"
for url in "$2" "$3"; do
[ -n "$url" ] || continue
[ -n "$url" ] || err "empty URL given in: xbmkget $*"
try_file "$url" "$@" || continue
eval "[ -$echk \"$4\" ] || continue"
return 0 # successful download/copy