refactor: restructure installation to modular architecture
- Remove monolithic bootstrap.sh in favor of modular design - Add install.sh as new main entry point with improved UX - Split functionality into focused modules: - lib/common.sh: shared utilities and environment detection - lib/packages.sh: base system packages - lib/neovim.sh: Neovim and LazyVim setup - lib/arduino.sh: Arduino CLI and board cores - lib/git.sh: Git and Lazygit configuration - lib/shell-config.sh: Zsh and shell environment - lib/starship.sh: Starship prompt setup - lib/zellij.sh: Zellij terminal multiplexer - lib/scaffold.sh: project scaffolding utilities - Update README with new installation instructions and architecture - Improve error handling and user feedback across modules - Maintain compatibility with both Arch Linux and Ubuntu/WSL2 This modular approach enables better maintainability, testing, and allows users to selectively run components as needed.
This commit is contained in:
23
lib/packages.sh
Normal file
23
lib/packages.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Step 1: Base packages
|
||||
|
||||
step "1/9 — Installing base packages"
|
||||
|
||||
if $IS_ARCH; then
|
||||
sudo pacman -Syu --noconfirm
|
||||
$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
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
$PKG_INSTALL build-essential git curl unzip wget ripgrep bat eza tree jq zsh clang-format tio
|
||||
# fd is named differently on Ubuntu
|
||||
sudo apt install -y fd-find 2>/dev/null || true
|
||||
fi
|
||||
info "Base packages installed"
|
||||
Reference in New Issue
Block a user