This commit is contained in:
MangoPig 2025-12-03 06:20:16 +00:00
parent 4ac11a8dd4
commit 4806f7a6b7

View File

@ -132,45 +132,31 @@ fi
# Install NVM, GVM, Rustup # Install NVM, GVM, Rustup
echo -e "${BLUE} LOG:${YELLOW} Installing NVM, GVM and Rustup...${NC}" echo -e "${BLUE} LOG:${YELLOW} Installing NVM, GVM and Rustup...${NC}"
# 1. Setup Node (LTS + Global Tools) # NVM
export NVM_DIR="$HOME/.nvm" if [ ! -d "$HOME/.nvm" ]; then
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Load NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
fi
if command -v nvm &> /dev/null; then # Go and GVM
echo -e "${BLUE} LOG:${YELLOW} Installing Node LTS...${NC}" wget https://go.dev/dl/go1.25.4.linux-amd64.tar.gz -O /tmp/go1.25.4.linux-amd64.tar.gz
nvm install --lts sudo rm -rf /usr/local/go
nvm use --lts sudo tar -C /usr/local -xzf /tmp/go1.25.4.linux-amd64.tar.gz
rm -f /tmp/go1.25.4.linux-amd64.tar.gz
echo -e "${BLUE} LOG:${YELLOW} Installing Global Node Packages (pnpm, yarn)...${NC}"
npm install -g pnpm yarn if [ ! -d "$HOME/.gvm" ]; then
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
fi fi
# 2. Setup Go (Bootstrap + Target) # Rustup
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm" # Load GVM if ! command -v rustup &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
TARGET_GO="go1.25.5"
if command -v gvm &> /dev/null; then
# Bootstrap check
if ! command -v go &> /dev/null; then
echo -e "${BLUE} LOG:${YELLOW} Bootstrapping Go...${NC}"
gvm install go1.24.0 -B
gvm use go1.24.0
fi
# Install Target
if [[ $(gvm list) != *"$TARGET_GO"* ]]; then
echo -e "${BLUE} LOG:${YELLOW} Installing Target Go ($TARGET_GO)...${NC}"
gvm install $TARGET_GO
gvm use $TARGET_GO --default
fi
fi fi
# 3. Setup Rust (Stable Default) # Install Eza with Cargo
if command -v rustup &> /dev/null; then echo -e "${BLUE} LOG:${YELLOW} Installing Eza via Cargo...${NC}"
echo -e "${BLUE} LOG:${YELLOW} Setting Rust to stable...${NC}" if ! command -v eza &> /dev/null; then
rustup default stable source "$HOME/.cargo/env"
rustup update cargo install eza
fi fi
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
@ -229,6 +215,18 @@ echo -e "${BLUE} LOG:${YELLOW} Stowing dotfiles...${NC}"
cd "$DOTFILES_DIR" cd "$DOTFILES_DIR"
stow . --target="$HOME" --ignore="setup.sh" --ignore=".git" --ignore=".gitignore" --ignore="README.md" --ignore=".zsh_secrets" --ignore=".zsh_secrets.example" --ignore="LICENSE" --ignore="Makefile" --ignore="provision.sh" stow . --target="$HOME" --ignore="setup.sh" --ignore=".git" --ignore=".gitignore" --ignore="README.md" --ignore=".zsh_secrets" --ignore=".zsh_secrets.example" --ignore="LICENSE" --ignore="Makefile" --ignore="provision.sh"
# Language Installation
echo -e "${BLUE} LOG:${YELLOW} Installing languages and tools...${NC}"
gvm install go1.25.5
gvm use go1.25.5 --default
nvm install --lts
nvm use --lts
rustup default stable
rustup update
# Finish # Finish
echo -e "${GREEN} LOG: Setup Complete! Please restart your terminal to apply all changes.${NC}" echo -e "${GREEN} LOG: Setup Complete! Please restart your terminal to apply all changes.${NC}"
echo -e "${GREEN} You may need to log out and back in for Docker group changes to take effect.${NC}" echo -e "${GREEN} You may need to log out and back in for Docker group changes to take effect.${NC}"