Bugfix: load_images cleanup, shellcheck fixes 09/30109/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 9 Mar 2017 04:17:40 +0000 (20:17 -0800)
committerRoss Brattain <ross.b.brattain@intel.com>
Thu, 9 Mar 2017 04:23:20 +0000 (20:23 -0800)
commit892d2e536e46a6e6427c061931c58f80b542589d
tree5d689ef0f21ce4a829b76b45f7eb43b1cfa106ab
parent270d6092c809e8de039a08efd8c108f865cf860e
Bugfix: load_images cleanup, shellcheck fixes

We should have run shellcheck on this.

This is why we don't use the shell, too many
obscure gotchas.

shellcheck: load_images.sh:25:75: warning: sudo doesn't affect redirects. Use .. | sudo tee -a file [SC2024]

  sudo echo foo >> /etc/foo won't work,

the >> will be run in the current shell,
replace with:

  echo foo | sudo tee -a /etc/foo

shellcheck: load_images.sh:47:15: warning: Declare and assign separately to avoid masking return values. [SC2155]

replace local cmd='a' with two line version

shellcheck: load_images.sh:141:32: error: [ .. ] can't match globs. Use [[ .. ]] or grep. [SC2081]

use [[ ]]

Change-Id: I14d9768612ea147eaf139603f7eb8753e979ba2c
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
tests/ci/load_images.sh