The `Box Store MultiTool of Embedded Linux`
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nathan Fisher a468b09816
utilbox/umount - use Vec::retain instead of iter/filter/collect
58 minutes ago
bitflags-mini Refactoring: 1 day ago
corebox Add `utilbox` binary and `umount` applet; Move `blkid` `mountpoint` and 5 hours ago
hashbox Refactoring: 1 day ago
mount Add `utilbox` binary and `umount` applet; Move `blkid` `mountpoint` and 5 hours ago
pw Refactoring: 1 day ago
src Add `utilbox` binary and `umount` applet; Move `blkid` `mountpoint` and 5 hours ago
unistd Refactoring: 1 day ago
unix-mode@0bbf1aed9a Refactoring: 1 day ago
utilbox utilbox/umount - use Vec::retain instead of iter/filter/collect 58 minutes ago
.gitignore Initial commit 2 months ago
CONTRIBUTING.md Relicensed as GPL3, improved documentation and CONTRIBUTING 3 weeks ago
Cargo.lock Refactoring: 1 day ago
Cargo.toml Add `utilbox` binary and `umount` applet; Move `blkid` `mountpoint` and 5 hours ago
LICENSE Relicensed as GPL3, improved documentation and CONTRIBUTING 3 weeks ago
README.md Add `sha284sum` and `sha512sum` applets 3 days ago

README.md

Contents

Introduction

Shitbox is inspired by the project busybox but with a much more limited scope. While Busybox aims to be "The swiss army knife of embedded linux" you can think of shitbox as being more like "The box store multi tool of embedded linux".

All joking aside the utilities which are present function mostly as expected and the code aims to be robust. It's written in Rust, not C, for whatever that's worth. Like Busybox it is a multi-call binary which is therefore able to share code between applets, making for an overall smaller binary.

Provided Commands

  • base32
  • base64
  • basename
  • bootstrap
  • chgrp
  • chmod
  • chown
  • chroot
  • clear
  • cut
  • dirname
  • echo
  • false
  • factor
  • fold
  • groups
  • head
  • hostid
  • hostname
  • link
  • logname
  • md5sum
  • mkfifo
  • mknod
  • mktemp
  • mountpoint
  • nologin
  • nproc
  • printenv
  • pwd
  • readlink
  • realpath
  • rev
  • rm
  • rmdir
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • shitbox
  • sleep
  • sync
  • true
  • unlink
  • wc
  • which
  • whoami
  • yes

Scope

Shitbox does not aim to supply an entire system of utilities, but rather a subset of the most common Unix shell utilities. Things which are out of scope for the project include:

  • Shells
  • Network servers
  • Kernel module handling utilities
  • Anything requiring suid or sgid bits such as su or sudo The code aims to be portable across Unix variants, ie Linux and BSD, but not MacOS or Windows. Development occurs on Linux, so if your OS is more exotic then YMMV.

Installation

Building is done using the official Rust toolchain. It is recommended that you install your toolchain using Rustup rather than distro packages, as old compiler versions are not supported.

cargo build --release

The bootstrap applet provides facility for installing the binary, creating all required symlinks and installing some nice to haves such as Unix man pages and shell completions [see below].

target/release/shitbox help bootstrap

Supported shells for completions

  • Bash
  • Fish
  • NuShell
  • PowerShell
  • Zsh