summaryrefslogtreecommitdiff
path: root/script/vendor
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-11-08 06:31:04 +0000
committerLeah Rowe <leah@libreboot.org>2023-11-08 06:34:12 +0000
commit5af3ae0586ba1f437cecab551ab4fba6fb6bdef1 (patch)
tree3c7e53042fb78f87da8d7a886ec558993baa54ef /script/vendor
parent64f933747021cb783230b9aef367921884ece555 (diff)
lbmk: don't use status for unconditional returns
in cases where lbmk must always return from a function, there are some cases where it relies on non-zero exit status, which in practise is always the case, but may change in the future if the relevant part is modified e.g. do_something && return 0 the proper form is: do_something return 0 also do this for unconditional exits Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/vendor')
-rwxr-xr-xscript/vendor/download6
-rwxr-xr-xscript/vendor/inject6
2 files changed, 8 insertions, 4 deletions
diff --git a/script/vendor/download b/script/vendor/download
index 12231b39..4613c2b6 100755
--- a/script/vendor/download
+++ b/script/vendor/download
@@ -140,8 +140,10 @@ vendor_checksum()
mkdirs()
{
- [ -f "${1}" ] && \
- printf "mkdirs ${1} ${2}: already downloaded\n" 1>&2 && return 1
+ if [ -f "${1}" ]; then
+ printf "mkdirs ${1} ${2}: already downloaded\n" 1>&2
+ return 1
+ fi
mkdir -p "${1%/*}" || err "mkdirs: !mkdir -p ${1%/*}"
x_ rm -Rf "${appdir}"
x_ mkdir -p "${appdir}/"
diff --git a/script/vendor/inject b/script/vendor/inject
index 93017cec..088851ca 100755
--- a/script/vendor/inject
+++ b/script/vendor/inject
@@ -14,8 +14,10 @@ eval "$(setvars "" archive rom modifygbe nukemode release new_mac)"
main()
{
[ $# -lt 1 ] && err "No options specified."
- [ "${1}" = "listboards" ] && \
- items config/coreboot && exit 0
+ if [ "${1}" = "listboards" ]; then
+ items config/coreboot || :
+ exit 0
+ fi
archive="${1}"