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:
20
lib/git.sh
Normal file
20
lib/git.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Step 8: Git + Lazygit
|
||||
|
||||
step "8/9 — Setting up Git + Lazygit"
|
||||
|
||||
if ! command -v lazygit &>/dev/null; then
|
||||
if $IS_ARCH; then
|
||||
$PKG_INSTALL lazygit
|
||||
else
|
||||
LAZYGIT_VERSION=$(curl -ks "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | jq -r '.tag_name' | sed 's/v//')
|
||||
curl -kLo /tmp/lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||
tar xf /tmp/lazygit.tar.gz -C /tmp lazygit
|
||||
sudo mv /tmp/lazygit /usr/local/bin/
|
||||
fi
|
||||
fi
|
||||
info "Lazygit installed"
|
||||
|
||||
mkdir -p ~/.config/lazygit
|
||||
write_lazygit_config ~/.config/lazygit/config.yml
|
||||
info "Lazygit configured with $THEME_DISPLAY_NAME"
|
||||
Reference in New Issue
Block a user