client: docker.bash: usage update/refactor

- Uses variable delimiters
- Adds current impl arguments
- Shortens 'dev-tools' example
This commit is contained in:
2024-07-17 22:29:01 -07:00
parent 51b9e15f08
commit cd9681566b

View File

@@ -32,6 +32,7 @@ function main()
[ -z "$global_basename" ] && lib_utils::die_fatal
[ -z "$global_arg_delim_1" ] && lib_utils::die_fatal
[ -z "$global_arg_delim_2" ] && lib_utils::die_fatal
[ -z "$global_arg_delim_3" ] && lib_utils::die_fatal
local _usage="
\e[32mDescription:\e[0m
@@ -93,7 +94,7 @@ function main()
$ alias docker-finance=\"$0 archlinux${global_arg_delim_1}${USER}:latest\"
\e[37;2m# Generate environment and build default image\e[0m
$ docker-finance gen && docker-finance build type=default
$ docker-finance gen && docker-finance build type${global_arg_delim_2}default
\e[37;2m# Bring up container, open shell (type 'exit' to leave)\e[0m
$ docker-finance up
@@ -106,7 +107,7 @@ function main()
\e[37;2m# Spawn a container with given command (removed after command finishes)\e[0m
\e[37;2m# NOTE: incredibly useful when used with your host's crontab\e[0m
$ docker-finance run 'finance family/alice fetch all=price'
$ docker-finance run 'finance family/alice fetch all${global_arg_delim_2}price'
\e[37;2m# Bring down running container (stop and remove container & network)\e[0m
$ docker-finance down
@@ -115,29 +116,29 @@ function main()
$ docker-finance backup && docker-finance rm && docker-finance build
\e[37;2m# Print current version of 'docker-finance' and client/container ('finance') dependencies\e[0m
$ docker-finance version
$ docker-finance version type${global_arg_delim_2}all
\e[37;2m#\e[0m
\e[37;2m# Dev-tools platform\e[0m
\e[37;2m#\e[0m
\e[37;2m# Setup an alias for dev-tools\e[0m
$ alias docker-finance_dev-tools=\"$0 dev-tools${global_arg_delim_1}${USER}:latest\"
$ alias dev-tools=\"$0 dev-tools${global_arg_delim_1}${USER}:latest\"
\e[37;2m# Generate environment and build default image\e[0m
$ docker-finance_dev-tools gen && docker-finance_dev-tools build type=default
$ dev-tools gen && docker-finance_dev-tools build type${global_arg_delim_2}default
\e[37;2m# Spawn a container with given command (removed after command finishes)\e[0m
$ docker-finance_dev-tools run 'shellcheck --version'
$ dev-tools run 'shellcheck --version'
\e[37;2m# Lint entire docker-finance source\e[0m
$ docker-finance_dev-tools linter type=bash,php,c++
$ dev-tools linter type${global_arg_delim_2}bash${global_arg_delim_3}php${global_arg_delim_3}c++
\e[37;2m# Generate Doxygen for docker-finance source\e[0m
$ docker-finance_dev-tools doxygen gen
$ dev-tools doxygen gen
\e[37;2m# Print current version of 'docker-finance' and client/container ('dev-tools') dependencies\e[0m
$ docker-finance_dev-tools version
$ dev-tools version type${global_arg_delim_2}all
"
#