Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit d3fbf0e

Browse files
committed
Update: Review of kd help info
1 parent 3467287 commit d3fbf0e

1 file changed

Lines changed: 32 additions & 19 deletions

File tree

kd.sh

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ echo_debug "begin"
1515
echo_debug "Docker Command Launcher (c) Kairops 2019"
1616

1717
# Command list
18-
commandList=(get-next-release-number git-changelog-generator hello-world md2html)
18+
commandList=(
19+
get-next-release-number
20+
git-changelog-generator
21+
hello-world
22+
md2html
23+
)
1924

2025
assertCommandExist () {
2126
local command="$1"
@@ -29,24 +34,32 @@ assertCommandExist () {
2934

3035
# Parameters check
3136
if [ $# -eq 0 ]; then
32-
echo_err "Usage: kd command [file_or_folder] [parameter] [parameter] [...] [-v]"
33-
echo_err
34-
echo_err " command: The Docker Command to execute, like 'hello-world' or 'git-changelog-generator'"
35-
echo_err
36-
echo_err "Options:"
37-
echo_err " [file_or_folder]: Optional file or folder to give to the container"
38-
echo_err " [parameter]: Optional parameters. Depends on the 'docker-command' you are running"
39-
echo_err
40-
echo_err "Examples:"
41-
echo_err
42-
echo_err " kd hello-world"
43-
echo_err " kd git-changelog-generator ."
44-
echo_err
45-
echo_err "You can also concatenate two or more Docker Commands through a pipe"
46-
echo_err
47-
echo_err "Examples:"
48-
echo_err
49-
echo_err " kd git-changelog-generator . | kd md2html > changelog.html"
37+
echo_err "Usage: kd command [file_or_folder] [parameter] [parameter] [...] [-v]
38+
39+
command: The Docker Command to execute, like 'hello-world' or 'git-changelog-generator'
40+
41+
Options:
42+
[file_or_folder]: Optional file or folder to give to the container
43+
[parameter]: Optional parameters. Depends on the 'docker-command' you are running
44+
45+
Examples:
46+
47+
kd hello-world
48+
kd git-changelog-generator .
49+
50+
You can also concatenate two or more Docker Commands through a pipe
51+
52+
Examples:
53+
54+
kd git-changelog-generator . | kd md2html - > changelog.html
55+
56+
Available commands:
57+
"
58+
59+
for item in ${commandList[*]}; do
60+
echo "* $item"
61+
done
62+
5063
echo_err
5164
echo_err "You can set KD_DEBUG=1 with 'export KD_DEBUG=1' to enable verbose debug info"
5265
echo_debug "end"

0 commit comments

Comments
 (0)