mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-20 15:08:37 +03:00
Initial commit
This commit is contained in:
25
external/CMSIS_5/CMSIS/Utilities/check_links.sh
vendored
Normal file
25
external/CMSIS_5/CMSIS/Utilities/check_links.sh
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
linkchecker -F csv --check-extern $1
|
||||
|
||||
OFS=$IFS
|
||||
IFS=$'\n'
|
||||
|
||||
for line in $(grep -E '^[^#]' linkchecker-out.csv | tail -n +2); do
|
||||
link=$(echo $line | cut -d';' -f 1)
|
||||
file=$(echo $line | cut -d';' -f 2)
|
||||
msg=$(echo $line | cut -d';' -f 4)
|
||||
src=$(echo $file | sed -E 's/file:\/\/(.*)\/Documentation\/(\w+)\/.*/\1\/DoxyGen\/\2/')
|
||||
if [ -d $src ]; then
|
||||
origin=$(grep -Ern "href=['\"]${link}['\"]" $src/src/)
|
||||
for o in $origin; do
|
||||
ofile=$(echo $o | cut -d':' -f 1)
|
||||
oline=$(echo $o | cut -d':' -f 2)
|
||||
echo "${ofile}:${oline};${link};${msg}" >&2
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
IFS=$OFS
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user