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/inject | |
| 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/inject')
| -rwxr-xr-x | script/vendor/inject | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/script/vendor/inject b/script/vendor/inject index 2e125f4f..e740704a 100755 --- a/script/vendor/inject +++ b/script/vendor/inject @@ -28,6 +28,7 @@ main()  		b) board=${OPTARG} ;;  		m) modifygbe=true  		   new_mac=${OPTARG} ;; +		*) : ;;  		esac  	done @@ -48,7 +49,7 @@ check_board()  			err "check_board: \"${rom}\" is not a valid path"  		[ -z "${rom+x}" ] && \  			err "check_board: no rom specified" -		[ ! -z ${board+x} ] || \ +		[ -n "${board+x}" ] || \  			board=$(detect_board "${rom}")  	else  		release="y" @@ -72,7 +73,7 @@ check_release()  detect_board()  {  	path="${1}" -	filename=$(basename ${path}) +	filename=$(basename "${path}")  	case ${filename} in  	grub_*)  		board=$(echo "${filename}" | cut -d '_' -f2-3) ;; @@ -185,12 +186,12 @@ patch_rom()  		    "${CONFIG_KBC1126_FW1_OFFSET}" && \  		inject "ecfw2.bin" "$CONFIG_KBC1126_FW2" "raw" \  		    "${CONFIG_KBC1126_FW2_OFFSET}" -	[ ! -z "${CONFIG_VGA_BIOS_FILE}" ] && \ -	    [ ! -z "${CONFIG_VGA_BIOS_ID}" ] && \ +	[ -n "${CONFIG_VGA_BIOS_FILE}" ] && \ +	    [ -n "${CONFIG_VGA_BIOS_ID}" ] && \  		inject "pci${CONFIG_VGA_BIOS_ID}.rom" \  		    "${CONFIG_VGA_BIOS_FILE}" "optionrom"  	[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" = "y" ] && \ -	    [ ! -z "${CONFIG_SMSC_SCH5545_EC_FW_FILE}" ] && \ +	    [ -n "${CONFIG_SMSC_SCH5545_EC_FW_FILE}" ] && \  		inject "sch5545_ecfw.bin" "$CONFIG_SMSC_SCH5545_EC_FW_FILE" raw  	[ "${modifygbe}" = "true" ] && ! [ "${release}" = "y" ] && \  		inject "IFD" "${CONFIG_GBE_BIN_PATH}" "GbE" | 
