Ubuntu 24.04's apt versions of fzf/fd/bat/eza/zoxide/ripgrep/tmux/nvim/
lazygit/starship are frozen at April 2024 — and the previous GitHub-
release downloads went stale the moment you stopped re-running the
installer. Homebrew on Linux fixes both: always-latest releases and a
single 'brew upgrade' to update the whole CLI stack.
Two-tier install:
apt - zsh + base plumbing + WezTerm (vendor repo) + Brave Beta
(vendor repo). Vendor repos auto-update via 'apt upgrade'.
brew - fzf fd bat eza zoxide ripgrep tmux neovim lazygit starship
gh zsh-syntax-highlighting zsh-autosuggestions
nvm - official installer (pinned NVM_VERSION)
tpm - tmux plugin manager clone
New files:
install/Brewfile - bundle for 'brew bundle'
install/lib/brew.sh - Homebrew bootstrap + brew bundle
install/lib/extras.sh - nvm + tpm
install/install.sh - rewired entry point with --packages-only,
--dotfiles-only, --help
install/README.md - new docs for the two-tier strategy
.zshrc:
- Source brew shellenv first when present, so brew bins win on PATH
- 'update' alias now: brew upgrade && sudo apt update && sudo apt upgrade
(previously apt-only; before that pacman-only)
Drops install/lib/packages.sh entries that the now-Brewfile-managed tools
duplicated, and removes the GitHub-release tarball install path.
22 lines
662 B
Bash
22 lines
662 B
Bash
#!/bin/bash
|
|
# Homebrew on Linux: install brew itself, then everything in the Brewfile.
|
|
# Brew owns the CLI toolchain so `brew upgrade` always gets latest versions.
|
|
|
|
BREW_PREFIX="/home/linuxbrew/.linuxbrew"
|
|
|
|
install_homebrew() {
|
|
if [[ -x $BREW_PREFIX/bin/brew ]]; then
|
|
info "Homebrew already installed"
|
|
else
|
|
info "Installing Homebrew..."
|
|
NONINTERACTIVE=1 bash -c \
|
|
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
fi
|
|
eval "$("$BREW_PREFIX/bin/brew" shellenv)"
|
|
}
|
|
|
|
install_brew_packages() {
|
|
install_homebrew
|
|
info "Installing Brewfile bundle..."
|
|
brew bundle --file="$DOTFILES_DIR/install/Brewfile"
|
|
}
|