Modular Structure
A place for each thing, and each thing at it's place!
Each Sh:erpa project aka BashBox, even for little things is made of separate files per logical unit, like header, bin (main entry point), options, etc in the src/
When running sherpa build, this will happen:
- Using the generated
src/__paths.txt, partials will be identified - Files sourced via
use "dir/file"insrc/bin.share added to the list - All needed paths are combined into a single file
- Documentation is generated from that file, and placed into
docs/myScript.md - Comments are stripped away from the production version of the script
- Empty lines, leading and trailing spaces are also removed
- The
#!/usr/bin/env bashshebang is added back at the top of the file - The resulted file is saved as
target/local/myScript - Obviously also made executable along the way
- Finally a symlink is created inside
~/.sherpa/binfor direct invocations - If the command is
sherpa runthe terminal is cleared and script executed - If the command is
sherpa compile, the script is compiled to a binary