Changes
This commit is contained in:
parent
4ac11a8dd4
commit
4806f7a6b7
66
setup.sh
66
setup.sh
@ -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
|
||||||
|
|
||||||
if command -v nvm &> /dev/null; then
|
|
||||||
echo -e "${BLUE} LOG:${YELLOW} Installing Node LTS...${NC}"
|
|
||||||
nvm install --lts
|
|
||||||
nvm use --lts
|
|
||||||
|
|
||||||
echo -e "${BLUE} LOG:${YELLOW} Installing Global Node Packages (pnpm, yarn)...${NC}"
|
|
||||||
npm install -g pnpm yarn
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. Setup Go (Bootstrap + Target)
|
# Go and GVM
|
||||||
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm" # Load GVM
|
wget https://go.dev/dl/go1.25.4.linux-amd64.tar.gz -O /tmp/go1.25.4.linux-amd64.tar.gz
|
||||||
|
sudo rm -rf /usr/local/go
|
||||||
|
sudo tar -C /usr/local -xzf /tmp/go1.25.4.linux-amd64.tar.gz
|
||||||
|
rm -f /tmp/go1.25.4.linux-amd64.tar.gz
|
||||||
|
|
||||||
TARGET_GO="go1.25.5"
|
if [ ! -d "$HOME/.gvm" ]; then
|
||||||
|
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
|
||||||
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)
|
# Rustup
|
||||||
if command -v rustup &> /dev/null; then
|
if ! command -v rustup &> /dev/null; then
|
||||||
echo -e "${BLUE} LOG:${YELLOW} Setting Rust to stable...${NC}"
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
rustup default stable
|
fi
|
||||||
rustup update
|
|
||||||
|
# Install Eza with Cargo
|
||||||
|
echo -e "${BLUE} LOG:${YELLOW} Installing Eza via Cargo...${NC}"
|
||||||
|
if ! command -v eza &> /dev/null; then
|
||||||
|
source "$HOME/.cargo/env"
|
||||||
|
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}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user