123 lines
5.3 KiB
Bash
Executable File
123 lines
5.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [[ -a ".env" ]]; then
|
|
source .env
|
|
fi
|
|
|
|
help-table() {
|
|
local cmd_width=24
|
|
local opt_width=18
|
|
local desc_width=50
|
|
local column="| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n"
|
|
|
|
printf "$column" "Command" "Option" "Description"
|
|
echo "|$(printf '%*s' $((cmd_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((opt_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((desc_width + 2)) '' | tr ' ' '-')|"
|
|