Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions tools/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Change Logs:
# Date Author Notes
# 2024-08-27 Supperthomas the first version
# 2025-08-09 ThearchyHelios Fix Darwin detection and URL
#

#这个脚本用于安装RT-Thread开发环境 请确保网络畅通
Expand Down Expand Up @@ -58,7 +59,7 @@ detect_os() {
if [ -f "/etc/os-release" ]; then
OS="Linux"
elif [ -f "/System/Library/CoreServices/SystemVersion.plist" ]; then
OS="macOS"
OS="Darwin"
elif [[ -d "/mnt/c/Windows" || -d "/c/Windows" ]]; then
OS="WSL"
else
Expand Down Expand Up @@ -91,7 +92,7 @@ install_on_ubuntu() {

# 根据检测结果决定是否使用--gitee参数
if [ "$use_gitee" = true ]; then
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh
wget https://gitee.com/RT-Thread-Mirror/env/raw/master/install_ubuntu.sh
chmod 777 install_ubuntu.sh
echo "Installing on China gitee..."
./install_ubuntu.sh --gitee
Expand Down Expand Up @@ -124,7 +125,7 @@ install_on_macos() {

# 根据检测结果决定是否使用--gitee参数
if [ "$use_gitee" = true ]; then
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_macos.sh
wget https://gitee.com/RT-Thread-Mirror/env/raw/master/install_macos.sh
chmod 777 install_macos.sh
echo "Installing on China gitee..."
./install_macos.sh --gitee
Expand All @@ -147,7 +148,7 @@ install_on_windows() {

# 根据检测结果决定是否使用--gitee参数
if [ "$use_gitee" = true ]; then
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_windows.ps1
wget https://gitee.com/RT-Thread-Mirror/env/raw/master/install_windows.ps1
echo "Installing on China gitee..."
./install_windows.ps1 --gitee
else
Expand All @@ -162,7 +163,7 @@ install_on_opensuse() {
echo "Installing on openSUSE..."
use_gitee=$(check_if_china_ip)
if [ "$use_gitee" = true ]; then
wget https://raw.githubusercontent.com/RT-Thread/env/master/install_suse.sh
wget https://gitee.com/RT-Thread-Mirror/env/raw/master/install_suse.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个本地执行的时候,能下载下来吗?
@ThearchyHelios

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的

chmod 777 install_suse.sh
echo "Installing on China gitee..."
./install_suse.sh --gitee
Expand Down Expand Up @@ -198,7 +199,7 @@ main() {
;;
esac
;;
macOS)
Darwin)
install_on_macos
;;
WSL)
Expand Down