Update nexus.sh
This commit is contained in:
parent
000ea7547b
commit
957c367126
14
nexus.sh
14
nexus.sh
@ -99,9 +99,17 @@ function start_node() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 检查 Rust 是否已安装
|
# 检查 Rust 是否已安装
|
||||||
if ! source <(wget -O - https://raw.githubusercontent.com/sdohuajia/rust/refs/heads/main/rust.sh); then
|
if command -v rustc &> /dev/null; then
|
||||||
show "安装 Rust 失败。" "error"
|
echo "Rust 已安装,版本为: $(rustc --version)"
|
||||||
exit 1
|
else
|
||||||
|
echo "Rust 未安装,正在安装 Rust..."
|
||||||
|
# 使用 rustup 安装 Rust
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
echo "Rust 安装完成。"
|
||||||
|
|
||||||
|
# 加载 Rust 环境
|
||||||
|
source $HOME/.cargo/env
|
||||||
|
echo "Rust 环境已加载。"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME/network-api" ]; then
|
if [ -d "$HOME/network-api" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user