Files
dotfiles/install.d/26-bat.sh
Andrejus e7a2b3c10e Fix bat install on Debian: symlink batcat to bat
Debian's apt package installs the binary as 'batcat' due to a naming
conflict. Add a symlink to /usr/local/bin/bat after apt install so the
dotfiles can reference 'bat' consistently across all platforms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-25 15:14:47 +00:00

34 lines
898 B
Bash

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install bat and build theme cache from dotfiles.
#
if ! command -v bat &> /dev/null; then
case "$DOTS_PKG" in
brew)
brew install bat
;;
apt)
sudo apt-get install -qq bat
# Debian installs binary as 'batcat'; symlink to 'bat'
if ! command -v bat &> /dev/null && command -v batcat &> /dev/null; then
sudo ln -sf "$(which batcat)" /usr/local/bin/bat
fi
;;
pacman)
sudo pacman -S --noconfirm bat
;;
*)
log_warn "Skipping bat install: no supported package manager found"
return 0
;;
esac
fi
bat --version | log_quote
bat cache --build 2>/dev/null
log_pass "bat theme cache built"