Breaking it down

This commit is contained in:
MangoPig
2025-12-04 09:23:10 +00:00
parent 45cd93d43d
commit 10f55ec25c
10 changed files with 276 additions and 281 deletions

23
scripts/rust.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
BLUE='\033[1;34m'
YELLOW='\033[1;33m'
GREEN='\033[1;32m'
NC='\033[0m'
echo -e "${BLUE} LOG:${YELLOW} Setting up Rust (Rustup)...${NC}"
# 1. Install Rustup
if ! command -v rustup &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
# 2. Source Environment
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
# 3. Update to Stable
if command -v cargo &> /dev/null; then
rustup default stable
rustup update
echo -e "${GREEN} LOG: Rust setup complete.$(cargo --version)${NC}"
fi