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" 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`.** diff --git a/install.sh b/install.sh index bc39a9ae..29b0f070 100755 --- a/install.sh +++ b/install.sh @@ -131,6 +131,17 @@ mirror='' 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: " + echo " ${0} [--channel ] [--mirror ] [--version ] [--setup-repo] [--no-autostart] [--dry-run] [--help]" + echo +} + while [ $# -gt 0 ]; do case "$1" in --channel) @@ -155,8 +166,14 @@ while [ $# -gt 0 ]; do --no-autostart) NO_AUTOSTART=1 ;; + --help) + usage + exit 0 + ;; --*) echo "Illegal option $1" + usage + exit 1 ;; esac shift $(( $# > 0 ? 1 : 0 ))