88# Change Logs:
99# Date Author Notes
1010# 2024-08-27 Supperthomas the first version
11+ # 2025-08-09 ThearchyHelios Fix Darwin detection and URL
1112#
1213
1314# 这个脚本用于安装RT-Thread开发环境 请确保网络畅通
@@ -58,7 +59,7 @@ detect_os() {
5859 if [ -f " /etc/os-release" ]; then
5960 OS=" Linux"
6061 elif [ -f " /System/Library/CoreServices/SystemVersion.plist" ]; then
61- OS=" macOS "
62+ OS=" Darwin "
6263 elif [[ -d " /mnt/c/Windows" || -d " /c/Windows" ]]; then
6364 OS=" WSL"
6465 else
@@ -91,7 +92,7 @@ install_on_ubuntu() {
9192
9293 # 根据检测结果决定是否使用--gitee参数
9394 if [ " $use_gitee " = true ]; then
94- wget https://raw.githubusercontent. com/RT-Thread/env/master/install_ubuntu.sh
95+ wget https://gitee. com/RT-Thread-Mirror /env/raw /master/install_ubuntu.sh
9596 chmod 777 install_ubuntu.sh
9697 echo " Installing on China gitee..."
9798 ./install_ubuntu.sh --gitee
@@ -124,7 +125,7 @@ install_on_macos() {
124125
125126 # 根据检测结果决定是否使用--gitee参数
126127 if [ " $use_gitee " = true ]; then
127- wget https://raw.githubusercontent. com/RT-Thread/env/master/install_macos.sh
128+ wget https://gitee. com/RT-Thread-Mirror /env/raw /master/install_macos.sh
128129 chmod 777 install_macos.sh
129130 echo " Installing on China gitee..."
130131 ./install_macos.sh --gitee
@@ -147,7 +148,7 @@ install_on_windows() {
147148
148149 # 根据检测结果决定是否使用--gitee参数
149150 if [ " $use_gitee " = true ]; then
150- wget https://raw.githubusercontent. com/RT-Thread/env/master/install_windows.ps1
151+ wget https://gitee. com/RT-Thread-Mirror /env/raw /master/install_windows.ps1
151152 echo " Installing on China gitee..."
152153 ./install_windows.ps1 --gitee
153154 else
@@ -162,7 +163,7 @@ install_on_opensuse() {
162163 echo " Installing on openSUSE..."
163164 use_gitee=$( check_if_china_ip)
164165 if [ " $use_gitee " = true ]; then
165- wget https://raw.githubusercontent. com/RT-Thread/env/master/install_suse.sh
166+ wget https://gitee. com/RT-Thread-Mirror /env/raw /master/install_suse.sh
166167 chmod 777 install_suse.sh
167168 echo " Installing on China gitee..."
168169 ./install_suse.sh --gitee
@@ -198,7 +199,7 @@ main() {
198199 ;;
199200 esac
200201 ;;
201- macOS )
202+ Darwin )
202203 install_on_macos
203204 ;;
204205 WSL)
0 commit comments