update_kernel: Fix lint, shellcheck issues

cros lint (part of PRESUBMIT) is now spitting out shellcheck errors.
Let's fix 'em.

Most are of the typical variety (lack of quoting; splitting 'local'
declarations from execution/assignment; ${variable} style). One odd one:

In update_kernel.sh line 80:
  ! remote_sh rootdev
  ^-- SC2251: This ! is not on a condition and skips errexit. Use `&& exit 1` instead, or make sure $? is checked.

Even if we were trying to handle errors, this is inverted; we expect
rootdev to succeed, not fail.

BUG=none
TEST=update_kernel.sh

Change-Id: I2e8217691325570197164863a04d1be8acf28f94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3489915
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
1 file changed