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