check fewer files

This commit is contained in:
Scott Lahteine 2025-12-21 15:05:12 -06:00
parent 85d4ee5c2b
commit c1cc7c2ff9

View file

@ -8,8 +8,10 @@ UA="Mozilla/5.0 (Linux; Android 10; SM-G996U Build/QP1A.190711.020; wv) AppleWeb
UTMP=$(mktemp)
#echo "[debug 1] UTMP = ${UTMP}"
echo "Gathering URLs. Please wait..."
find . -type f ! -path "*/\.*" -exec grep -Eo "https?:\/\/[^ \"''$$\<\>]+" {} \; 2>/dev/null \
find Marlin/src -type f ! -path "*/\.*" -exec grep -Eo "https?:\/\/[^ \"'\$\<\>]+" {} \; 2>/dev/null \
| sort -u -R \
| grep -v "Binary file" \
| grep -v "/licenses" | grep -v "MarlinFirmware/Marlin" | grep -v "st.com/resource" \
| sed -E "s/\/https?:\/\//\//" \
| sed -E 's/.*\((https?:\/\/[^ ]+)\).*$/\1/' \
| sed -E 's/.*\[(https?:\/\/[^ ]+)\].*$/\1/' \
@ -17,7 +19,6 @@ find . -type f ! -path "*/\.*" -exec grep -Eo "https?:\/\/[^ \"''$$\<\>]+" {} \;
| grep -vE "(127\.0\.0\.1|localhost|myserver|doc\.qt\.io|docs\.google\.com|raw\.githubusercontent\.com|[\${}])" \
| sed -E 's/]$//' | sed -E "s/'$//" | sed -E "s/[#.',]+$//" \
| sed -E 's/youtu\.be\/(.+)/www.youtube.com\/watch?v=\1/' \
| sort -u -R \
>"$UTMP"
#echo "[debug 2] link count = $(wc -l $UTMP)"