generate-repo-stub-readme.sh 807 B

12345678910111213141516171819202122232425262728293031
  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
  19. Hub page for the full readme on how to use the Docker image and for information
  20. regarding contributing and issues.
  21. The full readme is generated over in [docker-library/docs]($gitRepo),
  22. specificially in [docker-library/docs/$repo]($gitRepo/tree/master/$repo).
  23. EOREADME