diff --git a/buildroot/share/make/check-urls.sh b/buildroot/share/make/check-urls.sh index 7d9c0ad326..098a9edea9 100755 --- a/buildroot/share/make/check-urls.sh +++ b/buildroot/share/make/check-urls.sh @@ -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)"