From 5af3ae0586ba1f437cecab551ab4fba6fb6bdef1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 8 Nov 2023 06:31:04 +0000 Subject: 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 --- script/vendor/download | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'script/vendor/download') 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}/" -- cgit v1.2.1