one-click-installation-script/rust.sh

26 lines
1001 B
Bash
Raw Normal View History

2022-12-08 20:26:08 +08:00
#!/usr/bin/env bash
2022-12-08 20:41:52 +08:00
# 暂时只支持ubuntu
2022-12-08 20:26:08 +08:00
ver="2022.12.08"
changeLog="一键安装rust加载官方脚本"
clear
echo "#############################################################"
echo -e "# ${YELLOW}融合怪测评脚本${PLAIN} #"
echo "# 版本:$ver #"
2022-12-08 20:41:52 +08:00
echo "# 更新日志:$changeLog #"
2022-12-08 20:26:08 +08:00
echo -e "# ${GREEN}作者${PLAIN}: spiritlhl #"
echo "#############################################################"
echo ""
sudo apt update -y
sudo apt upgrade -y
sudo apt install curl build-essential gcc make -y
2022-12-08 20:42:58 +08:00
echo "加载官方安装脚本选择选项1安装"
2022-12-08 20:26:08 +08:00
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
source "$HOME/.profile"
2022-12-08 20:41:52 +08:00
echo "更新RUST"
2022-12-08 20:28:40 +08:00
rustup update
2022-12-08 20:41:52 +08:00
echo "打印编译管理器,编译器,文档工具版本,如果有误则安装失败"
2022-12-08 20:28:40 +08:00
cargo --version
rustc --version
rustdoc --version