generate-dockerfile-links-partial.sh 473 B

123456789101112131415161718
  1. #!/bin/bash
  2. set -Eeuo pipefail
  3. repo="${1:-}"
  4. if [ -z "$repo" ]; then
  5. echo >&2 "usage: $0 repo"
  6. echo >&2 " ie: $0 hylang"
  7. exit 1
  8. fi
  9. # if we haven't set BASHBREW_LIBRARY explicitly (like Jenkins does, for example), don't trust the local library
  10. if [ -z "${BASHBREW_LIBRARY:-}" ]; then
  11. repo="https://github.com/docker-library/official-images/raw/master/library/$repo"
  12. fi
  13. bashbrew cat \
  14. -F "$(dirname "$BASH_SOURCE")/$(basename "$BASH_SOURCE" .sh).tmpl" \
  15. "$repo"