use quotes when checking empty strings in scripts

this is far less error-prone

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-10-07 05:36:52 +01:00
parent 0fad3497b8
commit 4708da2ca9
6 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -41,11 +41,11 @@ handle_coreboot_utils()
{
for util in cbfstool ifdtool; do
x_ ./update project build ${_f} "src/coreboot/${1}/util/${util}"
[ -z ${mode} ] && [ ! -f "cbutils/${1}/${util}" ] && \
[ -z "${mode}" ] && [ ! -f "cbutils/${1}/${util}" ] && \
x_ mkdir -p "cbutils/${1}" && \
x_ cp "src/coreboot/${1}/util/${util}/${util}" \
"cbutils/${1}"
[ -z ${mode} ] || \
[ -z "${mode}" ] || \
x_ rm -Rf "cbutils/${1}"
done
}