general code cleanup in shell scripts

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-10-05 22:16:07 +01:00
parent cad7648a26
commit 106841024a
3 changed files with 19 additions and 31 deletions
+4 -4
View File
@@ -97,18 +97,18 @@ handle_src_tree()
target_dir="${cfgsdir}/${target}"
xx_ mkdir -p "${elfdir}/${target}"
eval "$(setvars "undefined" arch tree)"
eval "$(setvars "" arch tree)"
romtype="normal"
[ ! -f "${target_dir}/target.cfg" ] && \
[ -f "${target_dir}/target.cfg" ] || \
fail "handle_src_tree: ${target_dir}: missing target.cfg"
# Override the above defaults using target.cfg
. "${target_dir}/target.cfg" # source
[ "${tree}" = "undefined" ] && \
[ -z ${tree} ] && \
fail "handle_src_tree: ${target_dir}: tree undefined"
[ "${arch}" = "undefined" ] && \
[ -z ${arch} ] && \
fail "handle_src_tree: ${target_dir}: undefined cpu type"
codedir="${project}/${tree}"