From 5de8eda21c61fd7e1cf6b7e4ec6c9d98dae3e365 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 3 Oct 2023 12:59:35 +0100 Subject: general code cleanup in shell scripts Signed-off-by: Leah Rowe --- script/update/blobs/download | 2 +- script/update/blobs/inject | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'script/update/blobs') diff --git a/script/update/blobs/download b/script/update/blobs/download index f1cab1b8..fef6b2c6 100755 --- a/script/update/blobs/download +++ b/script/update/blobs/download @@ -147,7 +147,7 @@ extract_e6400vga() [ -f "${E6400_VGA_romname}" ] || \ err "extract_e6400vga: can't extract vga rom from bios.bin" ) - x_ cp "${appdir}"/"${E6400_VGA_romname}" "${_dest}" + x_ cp "${appdir}/${E6400_VGA_romname}" "${_dest}" } extract_sch5545ec() diff --git a/script/update/blobs/inject b/script/update/blobs/inject index 99eb9d5b..96ee0002 100755 --- a/script/update/blobs/inject +++ b/script/update/blobs/inject @@ -96,13 +96,10 @@ build_dependencies() inject_blobs() { release_archive="n" - if [ "${release}" = "true" ]; then - printf "patching release file\n" - release_archive="y" - patch_release_roms - else - x_ patch_rom "${rom}" - fi + [ "${release}" != "true" ] && x_ patch_rom "${rom}" && return 0 + printf "patching release file\n" + release_archive="y" + patch_release_roms } patch_release_roms() @@ -240,11 +237,9 @@ inject_blob_hp_kbc1126_ec() if [ "${_ec1_offset}" = "" ] || [ "${_ec1_offset}" = "" ]; then err "inject_blob_hp_kbc1126_ec: ${board}: offset not declared" - fi - if [ "${_ec1_location}" = "" ] || [ "${_ec2_location}" = "" ]; then + elif [ "${_ec1_location}" = "" ] || [ "${_ec2_location}" = "" ]; then err "inject_blob_hp_kbc1126_ec: ${board}: EC path not declared" - fi - if [ ! -f "${_ec1_location}" ] || [ ! -f "${_ec2_location}" ]; then + elif [ ! -f "${_ec1_location}" ] || [ ! -f "${_ec2_location}" ]; then err "inject_blob_hp_kbc1126_ec: ${board}: ecfw not downloaded" fi -- cgit v1.2.1