[COMMON] Fix "local var=XX" bashisms

Variable attribute 'local' is not POSIX but is LSB supported.
It is available in other shells such as ash or dash.
And in ksh, local is the default scope of functions vaiables.

Though, the syntax "local var=XX" is only supported and found in bash.
Sadly, this is not detected by checkbashims.

- fix "local var=XX" bashisms
- add a manual command in tox.ini to detect them in the CI

https://wiki.ubuntu.com/DashAsBinSh#local
https://wiki.ubuntu.com/DashAsBinSh#declare_or_typeset
https://stackoverflow.com/questions/12000949/scope-of-variables-in-ksh

Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Iff26e50cd352eeb760d923a4740a6f92184fe0f2
6 files changed