Skip to content

Commit 96cb825

Browse files
committed
build(bin) add script to check mysql download URLs
1 parent b6ebc20 commit 96cb825

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

bin/check_mysql_downloads.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# List of URLs to check
4+
urls=(
5+
"https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.3-macos14-arm64.tar.gz"
6+
"https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.3-macos14-x86_64.tar.gz"
7+
"https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.3-linux-glibc2.17-aarch64-minimal.tar"
8+
"https://dev.mysql.com/get/Downloads/MySQL-8.4/file/mysql-8.4.3-linux-glibc2.17-x86_64-minimal.tar"
9+
"https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.3-winx64.zip"
10+
)
11+
12+
# Function to check URL validity
13+
check_url() {
14+
local url=$1
15+
local status_code=$(curl -o /dev/null -s -w "%{http_code}\n" "$url")
16+
if [ "$status_code" -ne 400 ]; then
17+
echo "URL: $url is valid. Status code: $status_code"
18+
else
19+
echo "URL: $url is invalid. Status code: $status_code"
20+
fi
21+
}
22+
23+
# Loop through each URL and check its validity
24+
for url in "${urls[@]}"; do
25+
check_url "$url"
26+
done

0 commit comments

Comments
 (0)