Pipeline, build, and operations tools useful for any project written exclusively in bash and works across all major
platforms, devices, and operating systems.
- System setup, service management, cron, permissions separations
- Powerful tools for development workflows - automatic documentation for Bash scripts and functions, completions, and interactivity
This code toolkit depends solely on bash and a few other
binaries (jq, sed) and a conscientious decision has been made to not depend on any other language libraries, as of 2026
support for Bash 3 and 4 remains stable.
This toolkit assumes:
- Sources from this project are installed at
./bin/build/in your project (required) - Bash code files end with
.sh - Release notes are located in a dedicated subdirectory (can be configured per-project), using markdown
.md( required) and namedv1.0.0.mdwhich match version names (v1.0.0) (required)
To use in your project:
- copy
bin/build/install-bin-build.shinto your project (changing last line as needed) or useinstallInstallBuildto install the installation script (to be clear — installsinstall-bin-build.shinto your project with the correct path setup to your project root). - Run the installer it before you need this code (will be installed at
./bin/build) source bin/build/tools.shto load the library and use any function defined
To install it in the operating system:
- Copy
bin/build/install-bin-build.shto/usr/local/bin/build/andsudo /usr/local/bin/build/install-bin-build.sh - Source
/usr/local/bin/build/tools.shin your scripts to get access to all functions
bin/build/tools.sh- The only include required for all build tools functions, also can be used astools.sh identicalCheck ...
Zesk Build directories in your project structure:
./- Application root (same asbuildHome)./bin/build/- Zesk Build installation location (may not be changed)./bin/hooks/- Application hook implementation (hook-namewith.shon the end)./bin/env/- Your project's environment variables defaults (NAMEwith.shon the end if you usebuildEnvironmentLoadorbuildEnvironmentGet)./docs/release/v1.0.0.md- Release notes (override path by addingBUILD_RELEASE_NOTESenvironment)
Internally Zesk Build is organized:
bin/build/env/*.sh- All external environment variables are referenced here. Projects should override default behavior with./bin/env/*.shfiles.bin/build/tools/*.sh- Build tools function implementations and template files (.mdfiles)bin/build/hooks/*.sh- All default hooks are here - if your application does not implement them - these are used.
Requires:
jq- Parsing JSON files, some formattingbc- Floating-point mathcurlorwget- Remote installation
Optional:
shellcheck-bashlinting codepcregrep- documentation generation and supportunzip-awsInstall
As a shortcut to running functions:
#!/usr/bin/env bash
"${BASH_SOURCE[0]%/*}/../bin/build/tools.sh" decorate orange "The code is working."
To load all functions:
#!/usr/bin/env bash
# shellcheck source=/dev/null
if source "${BASH_SOURCE[0]%/*}/../bin/build/tools.sh"; then
decorate orange "The code is working."
bigText "Hooray."
else
printf -- "%s\n" "No tools.sh" 1>&2 && false
fi
For more complex (and more robust error handling) see __install and __tools code in bin/build/identical.
Scripts support loading one or more environment files and running commands directly in a test container:
bin/build/bitbucket-container.sh --env-file .env.MYTESTENV bin/test.sh
- On Mac OS X the Docker environment thinks non-executable files are executable,
notably
bin/build/README.mdis considered[ -x $file ]when you are inside the container when the directory is mapped from the operating system. If it's a non-mapped directory, it works fine. Seems to be a bug in how permissions are translated, I assume. Workaround falls back tolswhich is slow but works. SeeisExecutable. Added 2024-01.
All copyrights held by Market Acumen, Inc., a provider of infrastructure and cloud expertise.
License is MIT License. Source can be found online at GitHub.
Reviewed: 2026-01-05