summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@google.com>2023-02-13 11:42:43 -0500
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-14 09:00:11 +0000
commitaa3a7cbbff943e0857df8d273b3288509247cede (patch)
treef4a861a7b12d839bc4b807004113d1dabb4ca3fa
parent8921a785e4a0f696d33ec06ab3b6eaa438502784 (diff)
downloadvboot-aa3a7cbbff943e0857df8d273b3288509247cede.tar.gz
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 Signed-off-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4245619 Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/sign_official_build.sh7
1 files 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=