Merge remote-tracking branch 'origin/master'
This commit is contained in:
27
bootstrap.sh
27
bootstrap.sh
@@ -15,7 +15,10 @@ NC='\033[0m'
|
|||||||
|
|
||||||
info() { echo -e "${GREEN}[✓]${NC} $1"; }
|
info() { echo -e "${GREEN}[✓]${NC} $1"; }
|
||||||
warn() { echo -e "${YELLOW}[!]${NC} $1"; }
|
warn() { echo -e "${YELLOW}[!]${NC} $1"; }
|
||||||
error() { echo -e "${RED}[✗]${NC} $1"; exit 1; }
|
error() {
|
||||||
|
echo -e "${RED}[✗]${NC} $1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
step() { echo -e "\n${GREEN}━━━ $1 ━━━${NC}"; }
|
step() { echo -e "\n${GREEN}━━━ $1 ━━━${NC}"; }
|
||||||
|
|
||||||
# ── Detect environment ──────────────────────────────────────────
|
# ── Detect environment ──────────────────────────────────────────
|
||||||
@@ -49,7 +52,15 @@ step "1/9 — Installing base packages"
|
|||||||
|
|
||||||
if $IS_ARCH; then
|
if $IS_ARCH; then
|
||||||
sudo pacman -Syu --noconfirm
|
sudo pacman -Syu --noconfirm
|
||||||
$PKG_INSTALL base-devel git curl unzip wget ripgrep fd bat eza tree jq zsh clang tio
|
$PKG_INSTALL base-devel git curl unzip wget ripgrep fd bat eza tree jq zsh clang
|
||||||
|
# tio is in AUR — install yay if needed, then tio
|
||||||
|
if ! command -v yay &>/dev/null; then
|
||||||
|
info "Installing yay (AUR helper)..."
|
||||||
|
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||||
|
(cd /tmp/yay && makepkg -si --noconfirm)
|
||||||
|
rm -rf /tmp/yay
|
||||||
|
fi
|
||||||
|
yay -S --needed --noconfirm tio
|
||||||
else
|
else
|
||||||
sudo apt update && sudo apt upgrade -y
|
sudo apt update && sudo apt upgrade -y
|
||||||
$PKG_INSTALL build-essential git curl unzip wget ripgrep bat eza tree jq zsh clang-format tio
|
$PKG_INSTALL build-essential git curl unzip wget ripgrep bat eza tree jq zsh clang-format tio
|
||||||
@@ -62,7 +73,7 @@ info "Base packages installed"
|
|||||||
step "2/9 — Setting up Zsh"
|
step "2/9 — Setting up Zsh"
|
||||||
|
|
||||||
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
|
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
|
||||||
RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" || \
|
RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ||
|
||||||
RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -kfsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
info "Oh My Zsh installed"
|
info "Oh My Zsh installed"
|
||||||
else
|
else
|
||||||
@@ -71,10 +82,10 @@ fi
|
|||||||
|
|
||||||
ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"
|
ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"
|
||||||
|
|
||||||
[[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]] && \
|
[[ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]] &&
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
|
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
|
||||||
|
|
||||||
[[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]] && \
|
[[ ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]] &&
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
|
||||||
|
|
||||||
info "Zsh plugins installed"
|
info "Zsh plugins installed"
|
||||||
@@ -307,7 +318,11 @@ info "LazyVim plugins configured (Gruvbox + Arduino + LSP)"
|
|||||||
step "7/9 — Installing Arduino CLI + board cores"
|
step "7/9 — Installing Arduino CLI + board cores"
|
||||||
|
|
||||||
if ! command -v arduino-cli &>/dev/null; then
|
if ! command -v arduino-cli &>/dev/null; then
|
||||||
curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
|
if $IS_ARCH; then
|
||||||
|
$PKG_INSTALL arduino-cli
|
||||||
|
else
|
||||||
|
curl -kfsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sudo sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)"
|
info "Arduino CLI installed: $(arduino-cli version 2>/dev/null | head -1)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user