From dfd6bdea563a6fb45641efdf12d2e32704876d72 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 7f74d548..19d9fce1 100755 --- a/install.sh +++ b/install.sh @@ -165,6 +165,7 @@ while [ $# -gt 0 ]; do ;; --*) echo "Illegal option $1" + exit 1 ;; esac shift $(( $# > 0 ? 1 : 0 )) From e85245de80e9995eefe392ab4d023e9e70ae20b1 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 19d9fce1..829aa0eb 100755 --- a/install.sh +++ b/install.sh @@ -139,6 +139,14 @@ DRY_RUN=${DRY_RUN:-} REPO_ONLY=${REPO_ONLY:-0} NO_AUTOSTART=${NO_AUTOSTART:-0} SBX=${SBX:-0} + +usage() { + echo + echo "USAGE: " + echo " ${0} [--channel ] [--mirror ] [--version ] [--dry-run] [--help]" + echo +} + while [ $# -gt 0 ]; do case "$1" in --channel) @@ -163,8 +171,13 @@ while [ $# -gt 0 ]; do --no-autostart) NO_AUTOSTART=1 ;; + --help) + usage + exit 0 + ;; --*) echo "Illegal option $1" + usage exit 1 ;; esac From 3e7785d73b094e4edc6eda896babfe6e371b4497 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 829aa0eb..f0f86ff6 100755 --- a/install.sh +++ b/install.sh @@ -140,6 +140,9 @@ REPO_ONLY=${REPO_ONLY:-0} NO_AUTOSTART=${NO_AUTOSTART:-0} SBX=${SBX:-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 4b5b9326cf0beba058a1ee4d5c88049081a626b5 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 db04884b6f47f5372ab3abd7ba5184a5f1f847c0 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 24c0598e..9135fb86 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,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 aa0cf12dc061ec9013bb0cc31ed901d6539c674b 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 f0f86ff6..c67c0e79 100755 --- a/install.sh +++ b/install.sh @@ -146,7 +146,7 @@ SBX=${SBX:-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 }