diff options
author | Leah Rowe <leah@libreboot.org> | 2023-09-30 18:41:57 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-09-30 19:09:25 +0100 |
commit | 0a0defd3256ff5e29e3b4d129a04fb7546bc31ac (patch) | |
tree | 479d686f0578b506dbe3f862300e73c090ed8bcc /script/update/blobs/inject | |
parent | 49b266eb4248f87d111e9babae86a873300afa03 (diff) |
simplify initialising variables in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/blobs/inject')
-rwxr-xr-x | script/update/blobs/inject | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/script/update/blobs/inject b/script/update/blobs/inject index 01d4cfd6..654af5d3 100755 --- a/script/update/blobs/inject +++ b/script/update/blobs/inject @@ -292,12 +292,10 @@ inject_blob_dell_e6400_vgarom_nvidia() inject_blob_smsc_sch5545_ec() { rom="${1}" - _sch5545ec_location="${CONFIG_SMSC_SCH5545_EC_FW_FILE#../../}" - if [ ! -f "${_sch5545ec_location}" ]; then + [ -f "${_sch5545ec_location}" ] || \ err "inject_blob_smsc_sch5545_ec: SCH5545 fw missing" - fi "${cbfstool}" "${rom}" add -f "${_sch5545ec_location}" \ -n sch5545_ecfw.bin -t raw || \ @@ -307,12 +305,10 @@ inject_blob_smsc_sch5545_ec() modify_gbe() { printf "changing mac address in gbe to ${new_mac}\n" - - rom="${1}" - [ -z ${CONFIG_GBE_BIN_PATH} ] && \ err "modify_gbe: ${board}: CONFIG_GBE_BIN_PATH not set" + rom="${1}" _gbe_location=${CONFIG_GBE_BIN_PATH#../../} [ -f "${_gbe_location}" ] || \ |