From 95d51f84d20f65645b9c825abad3add976a0a2f6 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 13 Feb 2023 11:42:43 -0500 Subject: sign_official_build: Fix shellcheck echo lints Fix all instances of "SC2005 (style): Useless echo? Instead of 'echo $(cmd)', just use 'cmd'." BRANCH=none BUG=None TEST=cros lint scripts/image_signing/sign_official_build.sh TEST=scripts/image_signing/sign_official_build.sh recovery \ TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.bin TEST= tests/devkeys TEST= ~/chromiumos/src/build/images/reven/latest/chromiumos_image.signed Change-Id: Ia11a30187cb79077aeee4c626dc41de9bee5a12b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4245619 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4380984 Tested-by: Phoebe Wang Reviewed-by: Cheng Yueh Commit-Queue: Cheng Yueh Auto-Submit: Phoebe Wang --- scripts/image_signing/sign_official_build.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index e063cdad..a5945433 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -114,7 +114,7 @@ get_hash_from_config() { dm_config=$(get_dmparams_from_config "${kernel_config}") local vroot_dev vroot_dev=$(get_dm_device "${dm_config}" vroot) - echo $(get_verity_arg "${vroot_dev}" root_hexdigest) + get_verity_arg "${vroot_dev}" root_hexdigest } # Get the mapped device and its args. @@ -124,7 +124,7 @@ get_hash_from_config() { get_dm_device() { local dm=$1 local device=$2 - echo $(echo "${dm}" | sed -nre "s/.*${device}[^,]*,([^,]*).*/\1/p") + echo "${dm}" | sed -nre "s/.*${device}[^,]*,([^,]*).*/\1/p" } # Set the mapped device and its args for a device. @@ -135,8 +135,7 @@ set_dm_device() { local dm=$1 local device=$2 local args=$3 - echo $(echo "${dm}" | - sed -nre "s#(.*${device}[^,]*,)([^,]*)(.*)#\1${args}\3#p") + echo "${dm}" | sed -nre "s#(.*${device}[^,]*,)([^,]*)(.*)#\1${args}\3#p" } CALCULATED_KERNEL_CONFIG= -- cgit v1.2.1