mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Fix exit 0
This commit is contained in:
parent
3f63e5e47f
commit
bd78c4310b
1 changed files with 31 additions and 0 deletions
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
|
@ -34,3 +34,34 @@ jobs:
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
- name: URL Checker
|
||||||
|
run: |
|
||||||
|
echo "Starting url checker"
|
||||||
|
while IFS= read -r LINE; do
|
||||||
|
FILE=$(echo $LINE | cut -f 1 -d ':')
|
||||||
|
URL=$(echo $LINE | grep -IoE '\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')
|
||||||
|
|
||||||
|
# remove trailing / if it exists curl diferenciate between links with
|
||||||
|
# and without / at the end
|
||||||
|
# URL=`echo "$URL" | sed 's,/$,,'`
|
||||||
|
dict+=(["$URL"]="$FILE ")
|
||||||
|
done < <(grep -e 'https\?://' . -RIa --exclude='*.exe' --exclude-dir=.git | tr '*' ' ')
|
||||||
|
|
||||||
|
for UNIQ_URL in ${!dict[@]} # loop urls
|
||||||
|
do
|
||||||
|
CURL_RES=$(curl -I ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
|
||||||
|
RES=$?
|
||||||
|
|
||||||
|
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ];
|
||||||
|
then
|
||||||
|
echo "URL is: ${UNIQ_URL}"
|
||||||
|
echo "File names: ${dict[$UNIQ_URL]}"
|
||||||
|
if [ "${CURL_RES}" == '' ]
|
||||||
|
then
|
||||||
|
CURL_RES=$RES
|
||||||
|
fi
|
||||||
|
echo Result is: "${CURL_RES}"
|
||||||
|
echo "================================="
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit(0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue