verify_readmes.sh

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