[Toybox] Toybox Installer/setup routine?

enh enh at google.com
Wed Sep 4 13:47:11 PDT 2019


On Wed, Sep 4, 2019 at 1:39 PM Rob Landley <rob at landley.net> wrote:
>
> On 9/3/19 12:04 PM, enh via Toybox wrote:
> >> Just install into $HOME/toybox and add that to the start of the $PATH? Those
> >> commands would then be found first.
> >
> > yeah, that's what i did to run the toybox tests on jellybean: dumped
> > all the symlinks into /data/local/tmp/toybox and then modified $PATH.
> > note that the suggested command in `toybox --help` isn't helpful
> > because it's all about /usr/bin and so on... it might be useful to
> > have a one-liner for "build me a directory of symlinks right here".
>
> It's just an example. The install_flat version is even smaller:
>
>   for i in $(./toybox); do ln -s toybox $i; done
>
> Do you mean a docs change like:
>
> --- a/Config.in
> +++ b/Config.in
> @@ -22,6 +22,8 @@ config TOYBOX
>
>           To install command symlinks, try:
>             for i in $(/bin/toybox --long); do ln -s /bin/toybox $i; done
> +          or all in one directory:
> +            for i in $(./toybox); do ln -s toybox $i; done; PATH=$PWD:$PATH
>
>           Most toybox commands also understand the following arguments:

yes, that lgtm. (if there was an obvious short way to make it clear
that the former variant uses /usr/bin/ etc, i'd add that too, but
nothing's coming to me...)

> (Where "mkdir blah; mv toybox blah; cd blah" is implied. Dunno how explicit to
> be with this, I thought the first one gave them the idea. And I could show them
> how to echo "PATH=$PWD:\$PATH" >> /etc/profile but again... I assume they know?)

even if they don't, the toybox on-line help doesn't seem like the
place to explain that.

> Sigh, I need to do tutorial videos...
>
> Rob



More information about the Toybox mailing list