split the upstream binaries out of the package section
lazydocker, lazygit, starship and fastfetch were buried inside "System Update &
Essentials", after the package install and with no announcement — so a run
appeared to be installing system packages and then started pulling tarballs and
printing a five-shell starship tutorial. They are a different thing: upstream
binaries on their own release cadence, not anything the distribution ships. Now
their own step, announced in the same shape as the package section.
Each is checked before it is fetched. The original re-ran every installer on
every run, which is why a machine that already had starship got it reinstalled
along with its "add this to your ~/.zshrc" instructions — advice this script
does not want followed, since it writes the shell config itself. Its output is
now dropped; errors still surface.
Two real bugs fixed on the way:
lazygit's asset name was hardcoded to x86_64, so on arm64 the download 404s
and tar fails partway through the run. It now maps ARCH, and spells the
architectures the way lazygit does rather than the way we do.
The version was extracted with `tr -d 'v'`, which deletes every v in the
string rather than the leading one. `${version#v}` instead.
fastfetch stays a package but stops assuming the PPA is needed: Ubuntu picked
it up in 24.10, so the repository is now checked first and the PPA added only
where the archive has nothing. Verified on this host — noble genuinely has no
candidate, so the PPA is still the only source here.
Verified both branches of tools_install by stubbing the presence check.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,8 @@ PROGRESS_FILE="$SCRIPT_DIR/.setup-progress"
|
||||
source "$SCRIPT_DIR/lib/base.sh"
|
||||
# shellcheck source=lib/packages.sh
|
||||
source "$SCRIPT_DIR/lib/packages.sh"
|
||||
# shellcheck source=lib/tools.sh
|
||||
source "$SCRIPT_DIR/lib/tools.sh"
|
||||
|
||||
# Trap errors with context. Installed here rather than in lib/base.sh, because
|
||||
# that file is definitions only and a trap is a side effect on whoever sources it.
|
||||
@@ -89,34 +91,26 @@ if ! skip; then
|
||||
# shellcheck disable=SC2046 # word splitting is how the list is passed
|
||||
pkg_install "Core packages" $(pkgs_core)
|
||||
|
||||
ok "System updated and essentials installed"
|
||||
ok "System updated and core packages in place"
|
||||
SUMMARY+=("System packages updated, core packages installed")
|
||||
step_ok
|
||||
fi
|
||||
|
||||
# lazydocker
|
||||
info "Installing lazydocker..."
|
||||
curl -fsSL https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | DIR=/usr/local/bin bash
|
||||
ok "lazydocker installed"
|
||||
# =============================================================================
|
||||
# 2b. Command-line tools
|
||||
# =============================================================================
|
||||
#
|
||||
# Separate from the packages above because they are a different thing: upstream
|
||||
# binaries on their own release cadence, not anything the distribution ships.
|
||||
# Lumping them in made a run look like it was installing system packages and
|
||||
# then start downloading tarballs unannounced.
|
||||
|
||||
# lazygit
|
||||
info "Installing lazygit..."
|
||||
LAZYGIT_VERSION=$(curl -fsSL "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | jq -r '.tag_name' | tr -d 'v')
|
||||
curl -fsSLo /tmp/lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||
tar -C /usr/local/bin -xzf /tmp/lazygit.tar.gz lazygit
|
||||
rm -f /tmp/lazygit.tar.gz
|
||||
ok "lazygit installed"
|
||||
step "Command-line tools"
|
||||
if ! skip; then
|
||||
# shellcheck disable=SC2046 # word splitting is how the list is passed
|
||||
tools_install "Command-line tools" $(tools_default)
|
||||
|
||||
# starship
|
||||
info "Installing starship..."
|
||||
curl -fsSL https://starship.rs/install.sh | sh -s -- -y
|
||||
ok "starship installed"
|
||||
|
||||
# fastfetch
|
||||
info "Installing fastfetch..."
|
||||
add-apt-repository -y ppa:zhangsongcui3371/fastfetch > /dev/null 2>&1 || true
|
||||
apt-get update -y > /dev/null 2>&1
|
||||
apt-get install -y fastfetch
|
||||
ok "fastfetch installed"
|
||||
|
||||
SUMMARY+=("System packages updated and essentials installed")
|
||||
SUMMARY+=("Command-line tools: $(tools_default)")
|
||||
step_ok
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user