Git Product home page Git Product logo

bash-ecru's Introduction

Bash-Ecru

Module based bash framework.
It is meant to make developing bash-based scripts easier and faster.

The modules

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).

File structure

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')

Running a module

Example: running the module named 'TestModule':

./run.sh TestModule

Developer module

Ecru-Framework comes with a 'developer module'. It should be used for following actions:

Creating new modules

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

Removing the modules

To remove a module named 'TestModule' please run:

./run.sh dev rm TestModule

It will ask you for a confirmation and remove the module.

Packaging whole project

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

bash-ecru's People

Contributors

kamildzi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.