[OpenWrt-Devel] Question regarding call python script
bittorf at bluebottle.com
Fri Mar 11 05:51:46 EST 2016
* Paul Fertser <fercerpav at gmail.com> [11.03.2016 11:15]:
> As a sidenote, POSIX shell doesn't support associative arrays (which
> were mentioned in this thread), so it's probably worth clarifying
> whether it's ok to require bash >= 4 for OpenWrt build scripts or not.
yes, POSIX is "missing" some goodies of a full bash but:
"Stick to portable constructs where possible, and
you will make somebody's life easier in the future.
Maybe your own."
For all things you can use a workaround.
So, if you need an array e.g.
for e.g. easy iterating over it? use e.g. this approach:
array_set "test" 7
or for 2-dimensional arrays:
array_set "2dim" 3 14
array_get 3 14
you can simplify this by removing dim2 and ARRAYNAME if this is too much.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel