marian13 / bash_scripts_admin

A tool which manages bash scripts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bash-scripts-admin

A tool that manages bash scripts.

Installation

Navigate to a folder where you would like to install bash_scripts_admin and execute:

git clone https://github.com/marian13/bash_scripts_admin.git

If you are using macOS, additionally run:

brew install coreutils

Setup

cd bash_scripts_admin

BASH_PROFILE_PATH=~/.bash_profile . ./index.sh

Where BASH_PROFILE_PATH is a path to a file that is automatically loaded when you start a new bash session.

For example, it may be ~/.bash_profile on macOS.

Development

How to start local dev env?

Copy and run the following command:

cd ~/Projects/bash_scripts_admin \
  && direnv exec . tmuxinator start bash_scripts_admin

NOTE: tmuxinator is used instead of mux since it is not available inside direnv exec.

How to stop local dev env?

Use:

cd ~/Projects/bash_scripts_admin \
  && tmuxinator stop bash_scripts_admin

Glossary

  • Bash profile.
  • bash-scripts-admin.
  • bash-scripts.
  • Command.
  • Directive.
  • Effect.
  • Main entry point.
  • Provision.
  • Project.
  • Root path.
  • Subproject.

Conventions

  • Multi-word command and arguments names contain dashes as word separators.
  • Multi-word folder and file names contain underscores as word separators.
  • Leading tabs instead of spaces (for HEREDOCs).
  • Commands and options inside comments are enclosed by single quotes.

References

A list of links to the docs of bash commands, syntax structures, environment variables, and techniques used inside this project.

Commands

Syntax Structures

Environment Variables

Techniques

Future Plans

  • A detailed description of how exactly 'bash-scripts-admin' manages bash scripts.
  • Implementation of a way how to load and dump provision files.
  • Introduction of a new script type - installer (in addition to already existing commands and effects).
  • Arguments number checking.
  • More docs.
  • A frontmatter where additional options can be specified, such as which function should be unset when a directive is removed.
  • Specs, for example using Serverspec.
  • List commands.

About

A tool which manages bash scripts.


Languages

Language:Ruby 46.8%Language:Shell 45.5%Language:Dockerfile 7.8%