mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Fix script
This commit is contained in:
parent
d0890be528
commit
7c141b4cb4
2 changed files with 19 additions and 8 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -21,5 +21,4 @@ jobs:
|
|||
path: ./kernel
|
||||
- name: URL Checker
|
||||
run: |
|
||||
pwd
|
||||
sh kernel/.github/workflows/url_verifier.sh
|
||||
sh kernel/.github/workflows/url_verifier.sh kernel
|
||||
|
|
24
.github/workflows/url_verifier.sh
vendored
24
.github/workflows/url_verifier.sh
vendored
|
@ -5,15 +5,15 @@ echo "Verifying url links of: ${PROJECT}"
|
|||
if [ ! -d "$PROJECT" ]
|
||||
then
|
||||
echo "Directory passed does not exist"
|
||||
exit
|
||||
exit(1)
|
||||
fi
|
||||
|
||||
SCRIPT_RET=0
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
declare -A dict
|
||||
|
||||
dict+=(["test-2e"]="/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP-Demo/lwIP_Apps/apps/httpserver_raw_from_lwIP_download/makefsdata/makefsdata.exe")
|
||||
|
||||
function test {
|
||||
while IFS= read -r LINE; do
|
||||
FILE=$(echo $LINE | cut -f 1 -d ':')
|
||||
|
@ -30,17 +30,29 @@ function test {
|
|||
CURL_RES=$(curl -I ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
|
||||
RES=$?
|
||||
|
||||
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ];
|
||||
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
|
||||
if [ "${CURL_RES}" == '' ] # curl returned an error
|
||||
then
|
||||
CURL_RES=$RES
|
||||
SCRIPT_RET=1
|
||||
elif [ "${CURL_RES}" == '403' ]
|
||||
then
|
||||
|
||||
fi
|
||||
echo Result is: "${CURL_RES}"
|
||||
echo "================================="
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${RES} -ne 0 ]
|
||||
then
|
||||
exit(1)
|
||||
else
|
||||
exit(0)
|
||||
fi
|
||||
}
|
||||
|
||||
test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue