File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
set -eu
6
6
LINKCHECK=" $1 "
7
7
8
- let N_BROKEN=$( jq -r ' select(.status=="broken") | reduce inputs as $s(0;.+1)' " $LINKCHECK " )
9
- let N_REDIRECTED=$( jq -r ' select(.status=="redirected") | reduce inputs as $s(0;.+1)' " $LINKCHECK " )
8
+ N_BROKEN=$( jq -r ' select(.status=="broken") | reduce inputs as $s(0;.+1)' " $LINKCHECK " )
9
+ N_REDIRECTED=$( jq -r ' select(.status=="redirected") | reduce inputs as $s(0;.+1)' " $LINKCHECK " )
10
10
11
+ # shellcheck disable=SC2086
11
12
if [[ $N_BROKEN -gt 0 ]]; then
12
13
printf " \n\033[31;1m%s\033[0m\n" " Broken links"
13
14
jq -r ' select(.status=="broken") | "\(.filename):\(.lineno) \(.uri)\n \(.info)"' " $LINKCHECK "
14
15
fi
15
16
17
+ # shellcheck disable=SC2086
16
18
if [[ $N_REDIRECTED -gt 0 ]]; then
17
19
printf " \n\033[35;1m%s\033[0m\n" " Redirected links"
18
20
jq -r ' select(.status=="redirected") | "\(.filename):\(.lineno) \(.uri)\n \(.code) \(.info)"' " $LINKCHECK "
You can’t perform that action at this time.
0 commit comments