factory_install: Refactor and fix style nits.

No functional changes. Only fix lint errors:

- Move main to be the last function.
- Move all findLSBValue variables to beginning of file.
- Double quote variables.
- Add shellcheck pragmas.
- Deprecate INSTALL_FROM_OMAHA by FACTORY_INSTALL_FROM_USB.

BUG=None
TEST=build_image factory_install; Boots successfully.

Change-Id: I66f35b0972754d0ac0258931bdde2bd8f811834d
Reviewed-on: https://chromium-review.googlesource.com/503129
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>
1 file changed