mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-07-16 05:49:49 +00:00
2ebb33460c
- Removed dead Broadcom hardware IDs (4357/4358/4360/4727) from `_is_broadcom_b43`, retaining only valid ID 4352 to eliminate false positives in the case statement. - Added a guard in `_handle_wireless` Level 3 to verify `linux-headers` availability via `apt-cache policy`. Skips DKMS compilation if headers are missing, preventing transaction failures during installation. - Implemented Broadcom combo card detection (WiFi + Bluetooth) by scanning `PCI_BT_DEVS`. Automatically writes `/etc/modprobe.d/broadcom-combo.conf` with `softdep wl post: btusb` and warns users about potential reboot requirements. - Enhanced Level 2 (`firmware-b43-installer`) with post-installation validation for `/lib/firmware/b43`. Provides clear recovery instructions via `sudo dpkg-reconfigure firmware-b43-installer` if the directory is empty or missing after installation. - Created a new helper `_msg_red()` in `utils.sh` to handle critical error messages with colored Whiptail output, replacing standard alerts for migration warnings and failures. - Updated `repos/migrate.sh` to use `_msg_red()` for branch migration warnings and failure states, ensuring visibility of critical issues while keeping completion messages informative. - Verified headless mode guards across 16 separate extras files (`office.sh`, `fetch.sh`, `cursors.sh`, etc.), preventing unnecessary package installations on servers without display environments. - Completed syntax verification (`bash -n`) across all core and extra modules, ensuring no errors in the updated logic for firmware, gaming, swap, or repository management scripts. - update readme.md
49 lines
2.3 KiB
Bash
49 lines
2.3 KiB
Bash
#!/usr/bin/env bash
|
|
# fonts.sh — Fonts
|
|
|
|
_cat_fonts() {
|
|
local headless=false
|
|
_is_headless && headless=true
|
|
local -a items=()
|
|
if ! $headless; then
|
|
local bebas_state; bebas_state=$(_state "fonts-bebas-neue")
|
|
local anon_state; anon_state=$(_state "fonts-anonymous-pro")
|
|
local verana_state; verana_state=$(_state "fonts-adf-verana")
|
|
local f3270_state; f3270_state=$(_state "fonts-3270")
|
|
local liberation_state; liberation_state=$(_state "fonts-liberation")
|
|
local mscore_state; mscore_state=$(_state "ttf-mscorefonts-installer")
|
|
local ubuntu_state; ubuntu_state=$(_state "fonts-ubuntu")
|
|
local recommended_state; recommended_state=$(_state "fonts-recommended")
|
|
items+=(
|
|
"fonts-bebas-neue" "Bebas Neue (display)$(_inst fonts-bebas-neue)" "$bebas_state"
|
|
"fonts-anonymous-pro" "Anonymous Pro (monospace)$(_inst fonts-anonymous-pro)" "$anon_state"
|
|
"fonts-adf-verana" "ADF Verana (sans-serif)$(_inst fonts-adf-verana)" "$verana_state"
|
|
"fonts-3270" "IBM 3270 terminal font$(_inst fonts-3270)" "$f3270_state"
|
|
"fonts-liberation" "Liberation (MS-compatible)$(_inst fonts-liberation)" "$liberation_state"
|
|
"ttf-mscorefonts-installer" "Microsoft fonts (EULA required)$(_inst ttf-mscorefonts-installer)" "$mscore_state"
|
|
"fonts-ubuntu" "Ubuntu font family$(_inst fonts-ubuntu)" "$ubuntu_state"
|
|
"fonts-recommended" "Debian recommended fonts$(_inst fonts-recommended)" "$recommended_state"
|
|
)
|
|
fi
|
|
|
|
local choices
|
|
choices=$(_checklist "Fonts" "Select fonts to install${SCROLL_HINT}:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
|
|
"${items[@]}" \
|
|
)
|
|
clear
|
|
|
|
[ -z "$choices" ] && return
|
|
|
|
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
|
|
|
for pkg in $cleaned; do
|
|
if ! is_installed "$pkg"; then
|
|
_run_install "$pkg"
|
|
else
|
|
echo "$pkg already installed."
|
|
fi
|
|
done
|
|
|
|
echo -e "${GREEN}Fonts installed.${NC}"
|
|
}
|