Skip to content

Commit

Permalink
Exclude invalid link from checking (apache#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj authored Nov 8, 2019
1 parent f3230a0 commit a35084e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion landing-pages/check-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ echo "Found ${#pages[@]} HTML files."

echo "Searching links."
mapfile -t links < <(printf '%s\n' "${pages[@]}" | xargs -n 1 lynx -listonly -nonumbers -dump | grep -v " ")
mapfile -t external_links < <(printf '%s\n' "${links[@]}" | grep "^https\?://" | grep -v "http://localhost" | sort | uniq)
mapfile -t external_links < <(printf '%s\n' "${links[@]}" | grep "^https\?://" | grep -v "http://localhost" | grep -v "http://link/" | sort | uniq)
echo "Found ${#links[@]} links including ${#external_links[@]} unique external links."

echo "Checking links."
Expand Down

0 comments on commit a35084e

Please sign in to comment.