Well, that's a different question then, and something you should've mentioned. busybox is a very stripped-down toolset, and likely to not have many of the extensions available in your standard desktop utilities. When your script needs to be portable then you have to be very careful to only use features available on all the systems.
I did a bit of experimenting and some searching, and unfortunately it looks like ash simply doesn't support arrays
. You'll have to work out some other way to handle the data. The link above gives a basic workaround, but it isn't exactly pretty.
All the other substitution commands I gave do seem to be supported, however.
I'm not sure I understand all of your code anyway. What's this supposed to do, for example?
readlink -f '../usr/bin/components.xml' | while read obj
f= basename `dirname $obj`
First of all, the "f" line is broken, as it uses an embedded command without the proper bracketing (assuming you're actually trying to set a variable here, of course). Also, this is really a variation of what we talked about before, so all my previous comments apply here too. It's using the same while-loop-in-a-pipe subshell I mentioned before, meaning that even if you managed to set f correctly, it wouldn't be available anywhere else in the script (not that I see it being used anywhere else in the script anyway), and basename and dirname can be more efficiently handled with parameter substitutions.
But even more to the point, since there's only one input, the loop itself is completely unnecessary. Just set
f=$(readlink -f ../usr/bin/components.xml)