Skip to content
Permalink
Browse files

Go Travis

  • Loading branch information...
richelbilderbeek committed Jun 15, 2019
1 parent f199eff commit e5943f1c1555e4ff737056f77e4d56d884ee2422
Showing with 18 additions and 0 deletions.
  1. +18 −0 scripts
18 scripts
@@ -0,0 +1,18 @@
#!/bin/bash

# Collect all dead links in a file
find . -name \*.md -exec markdown-link-check {} \; 2>/dev/null | egrep "[✖]" > broken.txt

# Count the number of lines, extract only that number
n_broken=$(wc broken.txt --lines | cut -f 1 -d " ")

if [[ $n_broken > 0 ]]
then
echo "Number of broken files: "$n_broken
cat broken.txt
rm broken.txt
exit $n_broken
fi

rm broken.txt

0 comments on commit e5943f1

Please sign in to comment.
You can’t perform that action at this time.