marcmascort / bash-helpers
Bash 辅助工具
1.0.2
2020-08-09 08:37 UTC
This package is auto-updated.
Last update: 2024-09-09 17:48:37 UTC
README
安装
Composer
composer require marcmascort/bash-helpers
NPM
npm install mmb-bash-helpers
功能
使用非常简单,您只需要导入辅助文件。
source path/to/helpers
显示
success <message> warning <message> error <message> highlight <message> text <message> title <message> yell <message>
执行
try <command> die <message>
文件
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>
字符串
str_replace <search> <replace> <subject>
库
证书生成器
lib/cert-generate <hostname> <folder> <openssl_config_file>
Docker 机器端口转发器
lib/docker-machine-port-forwarder <port> [-h] [-s] [-f] [-e] [-hp]
管理 /etc/hosts
lib/manage-etc-hosts add <hostname> [<ip>] lib/manage-etc-hosts remove <hostname> [<ip>]
管理 git
lib/manage-git clone <repository> <folder> [<branch>] lib/manage-git submodule <arguments>