1.0.2 • Published 5 years ago
mmb-bash-helpers v1.0.2
BASH HELPERS
Installation
Composer
composer require marcmascort/bash-helpersNPM
npm install mmb-bash-helpersFunctions
Usage is very simply, you only need import helpers file.
source path/to/helpersDisplay
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>