A collection of functions for writing shell scripts
npm install @rnx-kit/tools-shell

@rnx-kit/tools-shell is a collection of functions for writing shell scripts.
You can import the entire package, or, to save space, import individual
categories:
``typescript
import * as tools from "@rnx-kit/tools-shell";
// Alternatively...
import * as asyncTools from "@rnx-kit/tools-shell/async";
import * as commandTools from "@rnx-kit/tools-shell/command";
`
| Category | Function | Description |
| -------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
| async | idle(ms) | Sleep for a specified numer of milliseconds. |once(func)
| async | | Wraps the function, making sure it only gets called once. |retry(func, retries, counter)
| async | | Calls the specified function, retrying up to specified number of times as long as the result is null. |withRetry(func, retries, counter)
| async | | Calls the specified function, retrying up to specified number of times as long as the function throws. |ensure(result, message)
| command | | Throws if the result of the process is non-zero. |ensureInstalled(check, message)
| command | | Throws if the provided command fails. |makeCommand(command, userOptions)
| command | | Creates an async function for calling the specified command. |makeCommandSync(command)
| command | | Creates a synchronous function for calling the specified command. |untar(archive)
| untar | | Invokes tar xf`. |