chore(install): optimize logging, speed, cleanup
- Version logged after [PASS] (not before) across all scripts - Pre-cache brew package lists with log_info progress - Read brew version from git describe cache (skip Ruby startup) - Batch mise use -g calls (single invocation for all tools) - Replace mise verify step with mise ls --current - Parallel vim plugin pulls - Skip donut compile when binary is fresh - Pre-check macOS defaults before writing (skip fsync when unchanged) - Pre-check dock state before dockutil calls - Remove redundant 'already installed' skip logs - Remove meetingbar and wispr-flow install scripts - Renumber scripts to fill gaps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
45
install.d/26-preview.sh
Executable file
45
install.d/26-preview.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Description:
|
||||
# Install preview dependencies: chafa (images), poppler (PDFs).
|
||||
#
|
||||
|
||||
# chafa — terminal image viewer
|
||||
if ! command -v chafa &> /dev/null; then
|
||||
case "$DOTS_PKG" in
|
||||
brew)
|
||||
brew install chafa
|
||||
;;
|
||||
apt)
|
||||
sudo apt-get install -qq chafa
|
||||
;;
|
||||
pacman)
|
||||
sudo pacman -S --noconfirm --needed chafa
|
||||
;;
|
||||
*)
|
||||
log_warn "Skipping chafa install: no supported package manager found"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# pdftotext — PDF text extraction (part of poppler)
|
||||
if ! command -v pdftotext &> /dev/null; then
|
||||
case "$DOTS_PKG" in
|
||||
brew)
|
||||
brew install poppler
|
||||
;;
|
||||
apt)
|
||||
sudo apt-get install -qq poppler-utils
|
||||
;;
|
||||
pacman)
|
||||
sudo pacman -S --noconfirm --needed poppler
|
||||
;;
|
||||
*)
|
||||
log_warn "Skipping poppler install: no supported package manager found"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
log_pass "preview dependencies"
|
||||
command -v chafa &> /dev/null && chafa --version | sed -n '1p' | log_quote
|
||||
command -v pdftotext &> /dev/null && pdftotext -v 2>&1 | sed -n '1p' | log_quote
|
||||
Reference in New Issue
Block a user