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
fsdg20230625
Leah Rowe 2023-05-15 04:14:50 +01:00
parent 0e1e9c1773
commit c4b0825c5e
1 changed files with 3 additions and 3 deletions

View File

@ -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
(