Skip to content

Commit

Permalink
quite mode by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cofyc committed Sep 5, 2019
1 parent 966c516 commit b5772a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/verify-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if ! which markdown-link-check &>/dev/null; then
sudo npm install -g markdown-link-check@3.7.3
fi

VERBOSE=${VERBOSE:-}
CONFIG_TMP=$(mktemp)
ERROR_REPORT=$(mktemp)

Expand Down Expand Up @@ -49,17 +50,20 @@ for d in dev $(ls -d v[0-9]*); do
-e "s#<ROOT>#$ROOT#g" \
-e "s#<DOC_ROOT>#$ROOT#g" \
scripts/markdown-link-check.tpl > $CONFIG_TMP
cat $CONFIG_TMP
if [ -n "$VERBOSE" ]; then
cat $CONFIG_TMP
fi
# TODO simplify this if markdown-link-check can process multiple files together
while read -r tasks; do
for task in $tasks; do
(
echo markdown-link-check --config "$CONFIG_TMP" "$task" -q
output=$(markdown-link-check --color --config "$CONFIG_TMP" "$task" -q)
if [ $? -ne 0 ]; then
printf "$output" >> $ERROR_REPORT
fi
echo "$output"
if [ -n "$VERBOSE" ]; then
echo "$output"
fi
) &
done
wait
Expand Down

0 comments on commit b5772a9

Please sign in to comment.