verify_readmes.sh 474 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # Copyright The OpenTelemetry Authors
  3. # SPDX-License-Identifier: Apache-2.0
  4. set -euo pipefail
  5. dirs=$(find . -type d -not -path "*/internal*" -not -path "*/test*" -not -path "*/example*" -not -path "*/.*" | sort)
  6. missingReadme=false
  7. for dir in $dirs; do
  8. if [ ! -f "$dir/README.md" ]; then
  9. echo "couldn't find README.md for $dir"
  10. missingReadme=true
  11. fi
  12. done
  13. if [ "$missingReadme" = true ] ; then
  14. echo "Error: some READMEs couldn't be found."
  15. exit 1
  16. fi