generate-repo-stub-readme.sh 939 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -e
  3. cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
  4. repo="$1"
  5. if [ -z "$repo" ]; then
  6. echo >&2 'error: no repo specified'
  7. cat >&2 <<EOUSAGE
  8. usage: $0 repo [> README.md]
  9. ie: $0 php > ../php/README.md
  10. This script generates a stub README to standard out for the specified repo.
  11. EOUSAGE
  12. exit 1
  13. fi
  14. gitRepo='https://github.com/docker-library/docs'
  15. hubPage="https://registry.hub.docker.com/_/$repo/"
  16. cat <<EOREADME
  17. # About this Repo
  18. This is the Git repo of the official Docker image for [$repo]($hubPage). See the Hub page for the full readme on how to use the Docker image and for information regarding contributing and issues.
  19. The full readme is generated over in [docker-library/docs]($gitRepo), specificially in [docker-library/docs/$repo]($gitRepo/tree/master/$repo).
  20. [![Travis CI](https://img.shields.io/travis/docker-library/$repo/master.svg)](https://travis-ci.org/docker-library/$repo/branches)
  21. EOREADME