From bb8948977f298d90e6d40526f9d1941c084f527b Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:21:29 -0500 Subject: [PATCH 1/6] Exit 1 when illegal option rather than do install Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index bc39a9ae..9cab95ef 100755 --- a/install.sh +++ b/install.sh @@ -157,6 +157,7 @@ while [ $# -gt 0 ]; do ;; --*) echo "Illegal option $1" + exit 1 ;; esac shift $(( $# > 0 ? 1 : 0 )) From 5e9b27585ec3fd1cce81c3523ddcb885d8e02a5e Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:30:52 -0500 Subject: [PATCH 2/6] Add --help flag to install.sh and usage function Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install.sh b/install.sh index 9cab95ef..ed27690b 100755 --- a/install.sh +++ b/install.sh @@ -131,6 +131,14 @@ mirror='' DRY_RUN=${DRY_RUN:-} REPO_ONLY=${REPO_ONLY:-0} NO_AUTOSTART=${NO_AUTOSTART:-0} + +usage() { + echo + echo "USAGE: " + echo " ${0} [--channel ] [--mirror ] [--version ] [--dry-run] [--help]" + echo +} + while [ $# -gt 0 ]; do case "$1" in --channel) @@ -155,8 +163,13 @@ while [ $# -gt 0 ]; do --no-autostart) NO_AUTOSTART=1 ;; + --help) + usage + exit 0 + ;; --*) echo "Illegal option $1" + usage exit 1 ;; esac From 26134f98bd60addbdfed14d55b32cd2f80c0b5c5 Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:18:02 -0500 Subject: [PATCH 3/6] Comment new function usage() per Coding Style guide Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index ed27690b..789af764 100755 --- a/install.sh +++ b/install.sh @@ -132,6 +132,9 @@ DRY_RUN=${DRY_RUN:-} REPO_ONLY=${REPO_ONLY:-0} NO_AUTOSTART=${NO_AUTOSTART:-0} +# Provide a helpful usage statement when --help or any invalid argument is passed +# to the script. Exit code deliberately not included here as error depends on +# argument provided. usage() { echo echo "USAGE: " From 4d709346b33ad800f47024ffeb61842787042c36 Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:20:26 -0500 Subject: [PATCH 4/6] Remove addt'l info (dead link) from PR template. Main link is widely inclusive of information already. Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4e48d5f8..e288db86 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,9 +4,6 @@ https://github.com/docker/cli/blob/master/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** -For additional information on our contributing process, read our contributing -guide https://docs.docker.com/opensource/code/ - If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" From 76a450351e9708155a00572803fb7b046427d6fe Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:21:26 -0500 Subject: [PATCH 5/6] Promote PR template contributing guidance to visible status on README Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 8c90aa90..61e80362 100644 --- a/README.md +++ b/README.md @@ -66,3 +66,11 @@ ruling it out in the future. docker/docker-install is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. + +## Contributing + +Make sure you have read and understood our [contributing +guidelines](https://github.com/docker/cli/blob/master/CONTRIBUTING.md). + +**Make sure all your commits are signed off and include a signature generated +with `git commit -s`.** From 5130d3e64e70cc8aa7f57842d0022fb0fb80f136 Mon Sep 17 00:00:00 2001 From: H Dub <14808878+hdub-tech@users.noreply.github.com> Date: Wed, 27 May 2026 16:16:09 -0500 Subject: [PATCH 6/6] Add setup-repo and no-autostart to install.sh usage statement Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com> --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 789af764..c7f5d340 100755 --- a/install.sh +++ b/install.sh @@ -138,7 +138,7 @@ NO_AUTOSTART=${NO_AUTOSTART:-0} usage() { echo echo "USAGE: " - echo " ${0} [--channel ] [--mirror ] [--version ] [--dry-run] [--help]" + echo " ${0} [--channel ] [--mirror ] [--version ] [--setup-repo] [--no-autostart] [--dry-run] [--help]" echo }