summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2017-09-23 05:36:44 -0400
committerchrome-bot <chrome-bot@chromium.org>2017-09-26 13:36:19 -0700
commit8e8be427abc7c0391d2454f5f189b2a99882ad10 (patch)
tree5e0e9892f729140277e9114204c82c6325fd8210
parenta2ccb41cbc875500fedc1cbe57a184e8461e31ad (diff)
downloadvboot-8e8be427abc7c0391d2454f5f189b2a99882ad10.tar.gz
image_signing: fix under quoting of channel
If the channel is missing or has whitespace, the test triggers errors in the script because the test command has bad quoting. BUG=None TEST=script no longer fails on an empty lsb-release BRANCH=None Change-Id: Ic2e6ab91ca4ec10c298d122aee1f7f7236b52bf2 Reviewed-on: https://chromium-review.googlesource.com/680059 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: David Riley <davidriley@chromium.org>
-rwxr-xr-xscripts/image_signing/ensure_sane_lsb-release.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh
index 007ded0f..d86eacb3 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -148,7 +148,8 @@ main() {
local boardvar=$(get_boardvar_from_lsb_release "${rootfs}")
channel=$(lsbval $lsb CHROMEOS_RELEASE_TRACK)
# For a canary or dogfood channel, appid maybe a different default value.
- if [ $channel = 'canary-channel' ] || [ $channel = 'dogfood-channel' ]; then
+ if [[ "${channel}" == 'canary-channel' ||
+ "${channel}" == 'dogfood-channel' ]]; then
eval "expected_appid=\"\$expected_appid_${channel%\-channel}\""
else
eval "expected_appid=\"\$expected_appid_$boardvar\""