fix several shellcheck warnings

lbmk didn't quote certain arguments in commands, or
used ! -z instead of -n, things like that. simple fixes.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-12-16 07:56:26 +00:00
parent 54ca5f24d2
commit 1eb4df6748
9 changed files with 43 additions and 42 deletions
+6 -6
View File
@@ -209,12 +209,12 @@ nukerom()
touch "${romdir}/vendorhashes" || err "!touch ${romdir}/vendorhashes"
(
cd "${romdir}" || err "!cd romdir ${romdir}, nukerom"
sha512sum *.rom >> vendorhashes || err "!create vendorhashes, nukerom"
sha512sum ./*.rom >> vendorhashes || err "!create vendorhashes, nukerom"
) || err "can't create vendor hashes"
for romfile in "${romdir}"/*.rom; do
[ -f "${romfile}" ] || continue
./vendor inject -r "${romfile}" -b ${target} -n nuke || \
./vendor inject -r "${romfile}" -b "${target}" -n nuke || \
err "!vendor inject (nuke) ${romfile}, nukerom"
done
}
@@ -255,13 +255,13 @@ mkrom_tarball()
f="release/${version}/roms/${archivename}"
mkdir -p "${f%/*}" || err "mkrom_tarball: !mkdir -p ${f%/*}"
(
cd "${romdir%/bin/${target}}" || err "!cd ${romdir%/bin/${target}}"
cd "${romdir%"/bin/${target}"}" || err "!cd ${romdir%"/bin/${target}"}"
mktarball "bin/${target}" "${archivename}.tar.xz"
) || err "can't create rom tarball"
mv "${romdir%/bin/${target}}/${archivename}.tar.xz"* "${f%/*}" || \
err "!mktarball, rom, ${f%/*}/${romdir%/bin/${target}}/${archivename}.tar.xz"
mv "${romdir%"/bin/${target}"}/${archivename}.tar.xz"* "${f%/*}" || \
err "!mktarball, rom, ${f%/*}/${romdir%"/bin/${target}"}/${archivename}.tar.xz"
printf "Created ROM archive: ${f%/*}/${archivename}.tar.xz"
printf "Created ROM archive: %s" "${f%/*}/${archivename}.tar.xz"
}
insert_version_files()