From 0ab1c3cab54a8bc56c6ae312db7c5052ef76efe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 6 Nov 2022 21:07:52 +0100 Subject: [PATCH] Make help follow docopt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- build-image.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build-image.sh b/build-image.sh index bb2abc8..eca15fc 100755 --- a/build-image.sh +++ b/build-image.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh +shopt -s extglob + images="mbt-node14-java11-docker mbt-node16-java11-docker mbt-node18-java11-docker \ mbt-node14-java17-docker mbt-node16-java17-docker mbt-node18-java17-docker \ mbt-node14-java19-docker mbt-node16-java19-docker mbt-node18-java19-docker" @@ -9,7 +11,19 @@ repositories="mbt-node14-java11-docker mbt-node16-java11-docker mbt-node18-java1 mbt-node14-java19-docker mbt-node16-java19-docker mbt-node18-java19-docker" usage() { - echo "Usage: ./$(basename $0) [-b <${images// /|}|all>] [-p <${repositories// /|}|all>] [-c]" 1>&2; exit 1; + echo " Build docker images. + + Usage: + ./$(basename $0) [-b ] + ./$(basename $0) [-p ] + ./$(basename $0) [-c] + ./$(basename $0) [-h] + + Options: + -h Show this help. + -b <${images//+([[:space:]])/|}|all> Build docker images. + -p <${repositories//+([[:space:]])/|}|all> Push docker images. + -c Clean docker images." 1>&2; exit 1; } build_all() { -- 2.34.1