From c4b0825c5e70697bac187a0a953cf9b8d122162c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 15 May 2023 04:14:50 +0100 Subject: [PATCH] download/coreboot: avoid variable conflict the "board" variable in prepare_new_coreboot_tree() is also declared in fetch_coreboot_trees for the one in prepare_new_coreboot_tree, it's passed as an argument to the function, so give it a new name i learned that some shells have a global scope, when using variables of the same name between functions --- resources/scripts/download/coreboot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/scripts/download/coreboot b/resources/scripts/download/coreboot index f120270c..4f9855dc 100755 --- a/resources/scripts/download/coreboot +++ b/resources/scripts/download/coreboot @@ -163,13 +163,13 @@ gitclone_coreboot_from_upstream() prepare_new_coreboot_tree() { - board=${1} + target=${1} cbtree=${2} cbrevision=${3} printf "Preparing coreboot tree: %s\n" ${cbtree} - [ "${cbtree}" != "${board}" ] && \ - printf "(for board: %s)\n" "${board}" + [ "${cbtree}" != "${target}" ] && \ + printf "(for board: %s)\n" "${target}" cp -R coreboot/coreboot "coreboot/${cbtree}" || exit 1 (