From a93f5197991ba351789af691bcbc70d28ef5c754 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Mon, 17 Jun 2024 01:05:28 +0100
Subject: [PATCH] roms: rename x variable to it in for loop

there are two for loops that use x as a variable anme,
and an idiosyncrasy of certain sh implementations is
that these become global;

the result in this case was that when you finish building
every target in "./build roms", it would print "libgfxinit"
repeatedly, comma separated, instead of a comma-separated
list of the targets that were built.

work around it by renaming the variable in one of the loops.

Signed-off-by: Leah Rowe <leah@libreboot.org>
---
 script/roms | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/script/roms b/script/roms
index 80e0a67..ddbf337 100755
--- a/script/roms
+++ b/script/roms
@@ -173,8 +173,8 @@ build_board()
 {
 	x_ rm -Rf "$romdir"
 
-	for x in "normal" "vgarom" "libgfxinit"; do
-		initmode="$x"
+	for it in "normal" "vgarom" "libgfxinit"; do
+		initmode="$it"
 		hmode="vesafb"
 		[ "$initmode" = "vgarom" ] || hmode="corebootfb"
 		modes="$hmode txtmode"
-- 
GitLab