opentelemetry.io/scripts/check-registry-urls

17 lines
444 B
Bash
Executable File

#!/bin/bash
REPO_DIR=$(dirname $0)/..
REGISTRY_FILES=$REPO_DIR/data/registry/*
for FILE in ${REGISTRY_FILES} ; do
REPO_URL=$(grep "repo: " "${FILE}")
REPO_URL=${REPO_URL# repo: }
if [ -n "${REPO_URL}" ] ; then
RESULT=$(curl -I -s "{$REPO_URL}" -o /dev/null -w "%{http_code}")
if [ "${RESULT}" != "200" ] ; then
echo -e "- [ ] $(basename ${FILE}): ${REPO_URL}, error ${RESULT}"
fi
fi
done