generate-dockerfile-links-partial.sh 691 B

1234567891011121314151617181920212223
  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. if [ -n "$ARCH_SPECIFIC_DOCS" ] && archTags="$(bashbrew list --uniq --arch-filter "$repo")" && [ -z "$archTags" ]; then
  14. echo "**WARNING:** THIS IMAGE *IS NOT SUPPORTED* ON THE \`$BASHBREW_ARCH\` ARCHITECTURE"
  15. exit
  16. fi
  17. bashbrew cat \
  18. -F "$(dirname "$BASH_SOURCE")/$(basename "$BASH_SOURCE" .sh).tmpl" \
  19. "$repo"