diff options
author | Leah Rowe <leah@libreboot.org> | 2023-12-16 07:56:26 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-12-16 07:56:26 +0000 |
commit | 1eb4df6748f94a08d44c623a56417199b99b371d (patch) | |
tree | e45f8b519cfe1e22dda8ef18763f8ae3546c477f /script/vendor/download | |
parent | 54ca5f24d20531ac728a9475a94912f0a08f29f7 (diff) |
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>
Diffstat (limited to 'script/vendor/download')
-rwxr-xr-x | script/vendor/download | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/script/vendor/download b/script/vendor/download index eada2e91..9431c441 100755 --- a/script/vendor/download +++ b/script/vendor/download @@ -54,7 +54,7 @@ detect_firmware() build_dependencies() { - [ -d ${cbdir} ] || \ + [ -d "${cbdir}" ] || \ x_ ./update trees -f coreboot ${cbdir##*/} for d in uefitool biosutilities bios_extract; do [ -d "src/${d}" ] && continue @@ -132,7 +132,7 @@ fetch() vendor_checksum() { - [ "$(sha512sum ${2} | awk '{print $1}')" != "${1}" ] || return 0 + [ "$(sha512sum "${2}" | awk '{print $1}')" != "${1}" ] || return 0 printf "Bad checksum for file: %s\n" "${2}" 1>&2 rm -f "${2}" || : return 1 @@ -141,7 +141,7 @@ vendor_checksum() mkdirs() { if [ -f "${1}" ]; then - printf "mkdirs ${1} ${2}: already downloaded\n" 1>&2 + printf "mkdirs %s %s: already downloaded\n" "${1}" "${2}" 1>&2 return 1 fi mkdir -p "${1%/*}" || err "mkdirs: !mkdir -p ${1%/*}" @@ -188,7 +188,7 @@ extract_intel_me() fi cdir="${1}" [ "${cdir#/a}" != "${cdir}" ] && cdir="${cdir#/}" - cd "${cdir}" + cd "${cdir}" || : done ) rm -Rf "${sdir}" || err "extract_intel_me: !rm -Rf ${sdir}" @@ -227,9 +227,9 @@ extract_kbc1126ec() extract_e6400vga() { - [ "${E6400_VGA_offset}" = "" ] && \ + [ -z "${E6400_VGA_offset}" ] && \ err "extract_e6400vga: E6400 VGA offset not defined" - [ "${E6400_VGA_romname}" = "" ] && \ + [ -z "${E6400_VGA_romname}" ] && \ err "extract_e6400vga: E6400 VGA ROM name not defined" tail -c +${E6400_VGA_offset} "${_dl}" | \ gunzip >"${appdir}/bios.bin" || : |