Module based bash framework.
It is meant to make developing bash-based scripts easier and faster.
Main difference comparing this framework to classical script coding is that you need to develop a new module instead of the script. Although developing a module might seem to be more effort, it is not. You type one command - and you are ready to go.
One command is enough to have a new module initialized (see below).
Simplified file structure:
Bash-Ecru
├── _Core - Ecru Framework
├── _dev - Develop Module: script directory (functions and configuration files)
├── dev.sh - Develop Module: main script
└── run.sh - Base runner (for running the modules)
Each module consists of two basic elements:
- main script (its name is passed as argument for
run.sh
) - script directory (its content is being sourced by the 'main script')
Example: running the module named 'TestModule':
./run.sh TestModule
Ecru-Framework comes with a 'developer module'. It should be used for following actions:
To create a new module named 'TestModule' please run:
./run.sh dev init TestModule
As a result you will get:
TestModule.sh
- main module script_TestModule
- directory with basic function and configuration examples
To remove a module named 'TestModule' please run:
./run.sh dev rm TestModule
It will ask you for a confirmation and remove the module.
To package whole project to *.tar.gz file, please run:
./run.sh dev build
This is useful for packaging and deployments.
NOTE: Compressed archive (*.tar.gz) will be saved 1 level above the project directory
NOTE: You might want to edit output package name - please check BUILD_PKG_NAME
setting at: ./_dev/000-Config.sh
NOTE: Current date is automatically added to package name - this is useful for versioning