A flexible shell-based build automation tool that runs project-specific build scripts inside isolated environments (Docker containers or chroot runtimes).
This repository is designed to make it easy to build, package, and post-process binaries reproducibly across different Linux distributions.
- 🔧 Run custom build scripts from a
scripts/directory - 🐳 Automatically falls back to Docker if no local chroot runtime is found
- 🏗️ Supports chroot-based runtimes (extracted root filesystems)
- 📦 Automatic dependency installation for:
apt(Debian/Ubuntu)apk(Alpine)xbps-install(Void Linux)
- 🧹 Post-build processing:
stripbinaries- Optional
upxcompression - Optional
packelfELF packing
- 🛡️ Runs builds in isolated environments for safety and reproducibility
- 🎯 Interactive runtime and script selection (supports
fzfif installed)
.
├── build.sh # Main build runner script
├── scripts/ # Per-project build definitions
├── chroots/ # Optional chroot runtimes (.tar or directories)
└── README.md
Each file inside scripts/ is a sourced shell script that defines variables used by the build system.
Common variables:
TARGET_DIR=project-source-dir
DOWNLOAD_CMD="git clone https://example.com/project.git $TARGET_DIR"
BUILD_CMD="make"
TARGET="binary-name"
PKG_CMD="" # Optional package install command
CLEANUP_CMD="" # Optional cleanup commandIf BUILD_CMD is missing, the script will drop you into an interactive shell inside the specified container/runtime.
./build.shThis will:
- Prompt you to select a build script
- Prompt you to select a runtime (or fall back to Docker)
./build.sh <script-name> <runtime-name>Examples:
./build.sh zip alpine
./build.sh dwm ubuntu:22.04If no matching runtime is found in chroots/, Docker is used automatically
You can place extracted root filesystems or tarballs in chroots/:
chroots/
├── alpine.tar.gz
├── voidlinux/
│ ├── bin/
│ ├── dev/
│ ├── proc/
│ └── sys/
These will be detected and offered as selectable runtimes.
- Built binaries are copied back to the host directory
- If name collisions occur, random suffixes are added
- You are prompted before deleting source directories or runtimes
- POSIX-compatible shell (
sh) - One of:
- Docker
sudo+ chroot-capable Linux system
- Optional tools:
fzf(interactive selection)upx(binary compression)git
- This script runs commands as root inside containers or chroots
- Review build scripts before running
- Use trusted Docker images or chroot archives only