marcmascort / bash-helpers
Bash helpers
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Shell
This package is auto-updated.
Last update: 2025-01-09 18:55:18 UTC
README
Installation
Composer
composer require marcmascort/bash-helpers
NPM
npm install mmb-bash-helpers
Functions
Usage is very simply, you only need import helpers file.
source path/to/helpers
Display
success <message> warning <message> error <message> highlight <message> text <message> title <message> yell <message>
Execution
try <command> die <message>
Files
make_executable <path/to/fileOrFolder> make_writable <path/to/fileOrFolder> make_readable <path/to/fileOrFolder> make_chmod <modes> <path/to/fileOrFolder> make_mkdir <path/to/fileOrFolder> make_mv <path/to/source/fileOrFolder> <path/to/target/fileOrFolder> make_cp <path/to/source/fileOrFolder> <path/to/target/fileOrFolder> make_rm <path/to/fileOrFolder>
Strings
str_replace <search> <replace> <subject>
Libraries
Certificate generator
lib/cert-generate <hostname> <folder> <openssl_config_file>
Docker machine port forwarder
lib/docker-machine-port-forwarder <port> [-h] [-s] [-f] [-e] [-hp]
Manage /etc/hosts
lib/manage-etc-hosts add <hostname> [<ip>] lib/manage-etc-hosts remove <hostname> [<ip>]
Manage git
lib/manage-git clone <repository> <folder> [<branch>] lib/manage-git submodule <arguments>