Don Penney f36db7e207 Fix use of 'let -i' in scripts
Unlike "declare -i" and "local -i", the bash "let" does not support a
"-i" option. Rather, it takes it as a variable reference. If no "i"
variable is defined in scope, it does not cause an issue. If "i" has
been defined somewhere, however, it may cause a syntax issue, as the i
is evaluated.

A recent update to build-stx-images.sh added a loop that defines an
"i" variable without limiting its scope. In a current image build,
this loop ends with having "i" defined as a URL. As a result, a
"syntax error in expression" occurs, causing the "with_retries"
function to fail to increment the counter. Should a build error occur,
the "with_retries" will never hit the retry limit, looping until it
has a successful result.

This update removes the -i from all "let -i" occurrences in the build
scripts.

Change-Id: I34ad49f8872a81659ff4caf8087b256ea9fb3d32
Closes-Bug: 1891189
Signed-off-by: Don Penney <don.penney@windriver.com>
2020-08-11 10:36:43 -04:00
..