From c503c772dd925ffbc1d9fa476591b70a7b201446 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 18 Sep 2023 05:26:24 -0500 Subject: [PATCH] Another pass on quickstart text. --- www/quick.html | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/www/quick.html b/www/quick.html index ec911232..d2669c47 100644 --- a/www/quick.html +++ b/www/quick.html @@ -3,25 +3,30 @@

Current release 0.8.10 (July 30, 2023)

-

Toybox combines many common Linux command line utilities together into -a single BSD-licensed executable. It's simple, small, fast, and reasonably -standards-compliant (POSIX-2008 and LSB 4.1).

- -

The filename tells toybox which command to run, so -it's commonly installed with sylinks like "ln -s toybox sed". -The name "toybox" uses its first argument as the command to run, ala -"./toybox df -a", and running "toybox" with no arguments lists -the available commands, currently:

+

Toybox is a single executable that can act like many different Linux command +line utilities, currently implementing:

-

You can get --help for most commands (ala sed --help), and ask toybox -for --help about commands (even ones like true or test -that don't take a --help argument) with either the "help" command -or "toybox --help test". Run "toybox --help" to see general help -about toybox.

+

Toybox uses its filename to determine which command to run, so +it's usually installed with symlinks like "ln -s toybox sed" +to put all the commands into the search $PATH. +The name "toybox" uses its first argument as the command to run, ala +"toybox df -a", so you can use it without installing it. Running +"toybox" with no arguments lists the available commands.

+ +

Each command has built-in documentation, +which you can get in three different ways:

+
    +
  1. most commands accept a --help argument (ala sed --help)
  2. +
  3. toybox has a "help" command (ala help sed or +toybox help sed)
  4. +
  5. toybox --help command lets you and ask toybox +for --help about commands. Run "toybox --help" with no other arguments +to see general help about toybox.
  6. +

You can download a toybox binary and try it out like so:

@@ -37,8 +42,8 @@ $ ./toybox ls -l --color

$ mkdir newdir
-$ mv toybox newdir
-$ for i in $(newdir/toybox); do ln -s toybox $i; done
+$ mv toybox newdir/
+$ for i in $(newdir/toybox); do ln -s toybox newdir/$i; done
$ export PATH="$PWD/newdir:$PATH"
ls --help

@@ -53,10 +58,10 @@ $ ./toybox
$ make tests

-

It has "make menuconfig" like the kernel (and clean, distclean, +

Toybox's build has "make menuconfig" like the kernel (and clean, distclean, allnoconfig, etc), see "make help" for more options. -The distribited binaries are statically linked against musl-libc to -provide a portable executable without external userspace dependencies. +The binaries distributed on the website are statically linked against musl-libc +to provide a portable executable without external userspace dependencies. To reproduce that:

@@ -64,7 +69,7 @@ $ git clone https://github.com/landley/toybox
$ cd toybox
$ wget https://landley.net/bin/toolchains/latest/x86_64-linux-musl-cross.tar.xz
$ tar xvf x86_64-linux-musl-cross.tar.xz
-$ LDFLAGS=--static CROSS_COMPILE=CROSS_COMPILE=x86_64-linux-musl-cross/bin/x86_64-linux-musl- make defconfig toybox
+$ LDFLAGS=--static CROSS_COMPILE=x86_64-linux-musl-cross/bin/x86_64-linux-musl- make defconfig toybox
$ ./toybox

-- 2.39.2