Clone the repository
First, clone the bash::framehead repository from GitHub:Compile the framework
The framework is distributed as modular source files insrc/ that need to be compiled into a single file before use:
compiled.sh in the current directory, containing all 16 modules and ~785 functions.
The compiled file is not included in the repository to prevent it from drifting out of sync with the source. Compiling it yourself ensures you have the latest version and gives you the flexibility of the modular architecture.
Custom output filename
You can specify a custom output filename:Compilation process
The compiler:- Collects all
.shfiles from thesrc/directory - Optionally runs
shellcheckon each module (if available) - Strips duplicate shebangs (keeps only the first one)
- Concatenates all modules into a single file
- Makes the output executable
Run static analysis
If
shellcheck is installed, each module is analyzed for common issues and the results are displayedConcatenate modules
All modules are combined into a single file, with shebangs removed from all but the first file
Project structure
Understanding the project layout helps when working with bash::framehead:Modular architecture
One of bash::framehead’s strengths is its modular design. You can customize which modules to include:Remove unwanted modules
Don’t need networking? Simply removesrc/net.sh before compiling:
Keep only what you need
For minimal builds, keepruntime.sh and only the modules you need:
Modules have minimal coupling to each other. As long as
runtime.sh is kept, the rest can be mixed and matched freely.Verify installation
After compilation, verify that everything works:Test the framework
Run the comprehensive test suite:Check framework statistics
Get detailed statistics about load time and function count:- File size in lines and bytes
- Load time in a fresh shell
- Function count by module
- Total functions loaded
Next steps
Quick start guide
Learn how to use bash::framehead in your scripts
Module reference
Explore all 16 modules and their functions