8
8
# Change Logs:
9
9
# Date Author Notes
10
10
# 2024-08-27 Supperthomas the first version
11
+ # 2025-08-09 ThearchyHelios Fix Darwin detection and URL
11
12
#
12
13
13
14
# 这个脚本用于安装RT-Thread开发环境 请确保网络畅通
@@ -58,7 +59,7 @@ detect_os() {
58
59
if [ -f " /etc/os-release" ]; then
59
60
OS=" Linux"
60
61
elif [ -f " /System/Library/CoreServices/SystemVersion.plist" ]; then
61
- OS=" macOS "
62
+ OS=" Darwin "
62
63
elif [[ -d " /mnt/c/Windows" || -d " /c/Windows" ]]; then
63
64
OS=" WSL"
64
65
else
@@ -91,7 +92,7 @@ install_on_ubuntu() {
91
92
92
93
# 根据检测结果决定是否使用--gitee参数
93
94
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
95
96
chmod 777 install_ubuntu.sh
96
97
echo " Installing on China gitee..."
97
98
./install_ubuntu.sh --gitee
@@ -124,7 +125,7 @@ install_on_macos() {
124
125
125
126
# 根据检测结果决定是否使用--gitee参数
126
127
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
128
129
chmod 777 install_macos.sh
129
130
echo " Installing on China gitee..."
130
131
./install_macos.sh --gitee
@@ -147,7 +148,7 @@ install_on_windows() {
147
148
148
149
# 根据检测结果决定是否使用--gitee参数
149
150
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
151
152
echo " Installing on China gitee..."
152
153
./install_windows.ps1 --gitee
153
154
else
@@ -162,7 +163,7 @@ install_on_opensuse() {
162
163
echo " Installing on openSUSE..."
163
164
use_gitee=$( check_if_china_ip)
164
165
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
166
167
chmod 777 install_suse.sh
167
168
echo " Installing on China gitee..."
168
169
./install_suse.sh --gitee
@@ -198,7 +199,7 @@ main() {
198
199
;;
199
200
esac
200
201
;;
201
- macOS )
202
+ Darwin )
202
203
install_on_macos
203
204
;;
204
205
WSL)
0 commit comments