mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
Testing new curl command for url checks
This commit is contained in:
parent
630b3f6a2a
commit
962f735f2f
1 changed files with 2 additions and 1 deletions
3
.github/actions/url_verifier.sh
vendored
3
.github/actions/url_verifier.sh
vendored
|
@ -8,6 +8,7 @@ then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
USER_AGENT='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36'
|
||||
SCRIPT_RET=0
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
@ -27,7 +28,7 @@ function test {
|
|||
|
||||
for UNIQ_URL in ${!dict[@]} # loop urls
|
||||
do
|
||||
CURL_RES=$(curl -I ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
|
||||
CURL_RES=$(curl -si --user-agent $(USER_AGENT) ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
|
||||
RES=$?
|
||||
|
||||
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue