mirror of
https://github.com/mfornos/awesome-microservices.git
synced 2024-11-27 11:24:38 -05:00
16 lines
312 B
Bash
Executable file
16 lines
312 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# README Checks
|
|
# =============
|
|
#
|
|
# - Prints dead links
|
|
#
|
|
|
|
DIR=$(dirname $0)
|
|
|
|
cat $DIR/../README.md | grep -o -E 'https?://[%\+-_./[:digit:][:alpha:]]+' | \
|
|
xargs -n1 -P 10 curl -o /dev/null --silent --head --write-out '%{url_effective} %{http_code}\n' | \
|
|
awk '$2 >= 400'
|
|
|
|
exit 0
|
|
|