mirror of
https://github.com/stornic56/debianito-post-install.git
synced 2026-09-14 06:02:35 +00:00
dual-gpu fix & lspci cache
- Replaced the restrictive Broadcom firmware installation flow with a persistent, step-by-step process in modules/firmware.sh. Now installs dkms, wireless-tools, and linux-headers-amd64 separately, then applies blacklist configuration, updates initramfs, and loads conflicting modules properly. - Fixed conky package name across system.sh and bullseye/extras.sh. Changed from "conky" to "conky-all" with corresponding state variable updates for correct installation via apt. - Corrected broken GRUB sed command in modules/gpu.sh for AMD GCN support. Added grep guard to prevent duplicate parameter insertion and fixed regex pattern for proper cmdline modification. - Added whiptail pre-flight check in debianito.sh. Auto-installs required TUI dependencies if missing before the main menu, preventing runtime failures. - Fixed home directory path resolution bug in modules/sudo_config.sh. Replaced eval echo "~$USER" with getent passwd approach for reliable user home detection across SUDO_USER contexts. - Implemented global lspci output caching across 18+ locations. Single cache population via _init_lspci_cache() before detect_gpu, all subsequent reads use LSPCI_OUTPUT variable to eliminate redundant hardware polling calls. - Added apt update deduplication helper in modules/utils.sh. _ensure_apt_updated() with APT_UPDATED flag bypasses redundant package list refreshes across extras/, gaming/, firmware/, and desktop_display/ modules while preserving transactional rollback paths in repos.sh. - Fixed STATE_REFRESHED logic in debianito.sh main_menu case statement. Added STATE_REFRESHED=true to branches 3, 5, 7, 9, 11, 12, and 13 that mutate system state, ensuring refresh_system_state() triggers correctly after configuration changes. - Removed dead REPOS_CONFIGURED variable from debianito.sh and modules/repos.sh. Variable was written but never read, eliminated to clean up global namespace without affecting repository functionality.
This commit is contained in:
@@ -6,7 +6,7 @@ _install_signal() {
|
||||
if [ ! -f /etc/apt/sources.list.d/extrepo_signal.sources ]; then
|
||||
_run_cmd "Signal" "sudo extrepo enable signal" "Enabling Signal repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
if ! is_installed "signal-desktop"; then
|
||||
_run_cmd "Signal" "sudo apt install -y signal-desktop" "Installing Signal..."
|
||||
echo -e "${GREEN}Signal installed.${NC}"
|
||||
@@ -50,13 +50,16 @@ _cat_communication() {
|
||||
fi
|
||||
|
||||
local -a items=()
|
||||
local signal_state; signal_state=$(_state "signal-desktop")
|
||||
local telegram_state; telegram_state=$(_state "telegram-desktop")
|
||||
local hexchat_state; hexchat_state=$(_state "hexchat")
|
||||
local signal_state
|
||||
signal_state=$(_state "signal-desktop")
|
||||
local telegram_state
|
||||
telegram_state=$(_state "telegram-desktop")
|
||||
local hexchat_state
|
||||
hexchat_state=$(_state "hexchat")
|
||||
items+=(
|
||||
"signal-desktop" "Signal Private Messenger (extrepo)" "$signal_state"
|
||||
"telegram-desktop" "Telegram Desktop messaging" "$telegram_state"
|
||||
"hexchat" "IRC client (HexChat)" "$hexchat_state"
|
||||
"signal-desktop" "Signal Private Messenger (extrepo)" "$signal_state"
|
||||
"telegram-desktop" "Telegram Desktop messaging" "$telegram_state"
|
||||
"hexchat" "IRC client (HexChat)" "$hexchat_state"
|
||||
)
|
||||
|
||||
local item_count=${#items[@]}
|
||||
@@ -67,19 +70,20 @@ _cat_communication() {
|
||||
clear
|
||||
[ -z "$choices" ] && return
|
||||
|
||||
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
for pkg in $cleaned; do
|
||||
case $pkg in
|
||||
signal-desktop) _install_signal ;;
|
||||
telegram-desktop) _install_telegram ;;
|
||||
hexchat)
|
||||
if ! is_installed "hexchat"; then
|
||||
_run_install "hexchat"
|
||||
echo -e "${GREEN}hexchat installed.${NC}"
|
||||
else
|
||||
echo "hexchat already installed."
|
||||
fi
|
||||
;;
|
||||
signal-desktop) _install_signal ;;
|
||||
telegram-desktop) _install_telegram ;;
|
||||
hexchat)
|
||||
if ! is_installed "hexchat"; then
|
||||
_run_install "hexchat"
|
||||
echo -e "${GREEN}hexchat installed.${NC}"
|
||||
else
|
||||
echo "hexchat already installed."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo -e "${GREEN}Communication tools installed.${NC}"
|
||||
|
||||
@@ -8,7 +8,7 @@ _enable_jellyfin_repo() {
|
||||
fi
|
||||
_run_cmd "Jellyfin" "sudo extrepo enable jellyfin" "Enabling Jellyfin repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_jellyfin() {
|
||||
|
||||
+166
-145
@@ -16,13 +16,13 @@ _enable_mozilla_repo() {
|
||||
_run_cmd "Mozilla" "sudo extrepo enable mozilla" "Enabling Mozilla repository..."
|
||||
fi
|
||||
if [ ! -f /etc/apt/preferences.d/mozilla ]; then
|
||||
sudo tee /etc/apt/preferences.d/mozilla > /dev/null << 'EOF'
|
||||
sudo tee /etc/apt/preferences.d/mozilla >/dev/null <<'EOF'
|
||||
Package: *
|
||||
Pin: origin packages.mozilla.org
|
||||
Pin-Priority: 1000
|
||||
EOF
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
_enable_floorp_repo() {
|
||||
@@ -30,7 +30,7 @@ _enable_floorp_repo() {
|
||||
_ensure_extrepo
|
||||
_run_cmd "Floorp" "sudo extrepo enable floorp" "Enabling Floorp repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_palemoon() {
|
||||
@@ -60,7 +60,7 @@ install_palemoon() {
|
||||
else
|
||||
_ensure_extrepo
|
||||
_run_cmd "Pale Moon" "sudo extrepo enable ${REPO_PALEMOON}" "Enabling ${REPO_PALEMOON}..."
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
fi
|
||||
|
||||
if ! is_installed "palemoon"; then
|
||||
@@ -76,7 +76,7 @@ _enable_librewolf_repo() {
|
||||
_ensure_extrepo
|
||||
_run_cmd "LibreWolf" "sudo extrepo enable librewolf" "Enabling LibreWolf repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
_enable_tailscale_repo() {
|
||||
@@ -84,7 +84,7 @@ _enable_tailscale_repo() {
|
||||
_ensure_extrepo
|
||||
_run_cmd "Tailscale" "sudo extrepo enable tailscale" "Enabling Tailscale repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
_enable_mullvad_repo() {
|
||||
@@ -92,14 +92,14 @@ _enable_mullvad_repo() {
|
||||
_ensure_extrepo
|
||||
_run_cmd "Mullvad" "sudo extrepo enable mullvad" "Enabling Mullvad repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_protonvpn() {
|
||||
if [ ! -f /etc/apt/sources.list.d/extrepo_protonvpn.sources ]; then
|
||||
_ensure_extrepo
|
||||
_run_cmd "ProtonVPN" "sudo extrepo enable protonvpn stable" "Enabling ProtonVPN repository (stable suite)..."
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
else
|
||||
echo "ProtonVPN repository already enabled."
|
||||
fi
|
||||
@@ -119,69 +119,90 @@ _cat_internet() {
|
||||
_is_headless && headless=true
|
||||
local -a items=()
|
||||
if ! $headless; then
|
||||
local chromium_state; chromium_state=$(_state "chromium")
|
||||
local dillo_state; dillo_state=$(_state "dillo")
|
||||
local epiphany_state; epiphany_state=$(_state "epiphany-browser")
|
||||
local falkon_state; falkon_state=$(_state "falkon")
|
||||
local chromium_state
|
||||
chromium_state=$(_state "chromium")
|
||||
local dillo_state
|
||||
dillo_state=$(_state "dillo")
|
||||
local epiphany_state
|
||||
epiphany_state=$(_state "epiphany-browser")
|
||||
local falkon_state
|
||||
falkon_state=$(_state "falkon")
|
||||
local firefox_state="OFF"
|
||||
if command -v firefox &>/dev/null && ! is_installed "firefox-esr"; then
|
||||
firefox_state="ON"
|
||||
fi
|
||||
local firefox_esr_state
|
||||
firefox_esr_state=$(_state "firefox-esr")
|
||||
local floorp_state; floorp_state=$(_state "floorp")
|
||||
local konqueror_state; konqueror_state=$(_state "konqueror")
|
||||
local librewolf_state; librewolf_state=$(_state "librewolf")
|
||||
local palemoon_state; palemoon_state=$(_state "palemoon")
|
||||
local privacybrowser_state; privacybrowser_state=$(_state "privacybrowser")
|
||||
local qutebrowser_state; qutebrowser_state=$(_state "qutebrowser")
|
||||
local thunderbird_state; thunderbird_state=$(_state "thunderbird")
|
||||
local torbrowser_state; torbrowser_state=$(_state "torbrowser-launcher")
|
||||
local mullvadbrowser_state; mullvadbrowser_state=$(_state "mullvad-browser")
|
||||
local protonvpn_state; protonvpn_state=$(_state "protonvpn")
|
||||
local floorp_state
|
||||
floorp_state=$(_state "floorp")
|
||||
local konqueror_state
|
||||
konqueror_state=$(_state "konqueror")
|
||||
local librewolf_state
|
||||
librewolf_state=$(_state "librewolf")
|
||||
local palemoon_state
|
||||
palemoon_state=$(_state "palemoon")
|
||||
local privacybrowser_state
|
||||
privacybrowser_state=$(_state "privacybrowser")
|
||||
local qutebrowser_state
|
||||
qutebrowser_state=$(_state "qutebrowser")
|
||||
local thunderbird_state
|
||||
thunderbird_state=$(_state "thunderbird")
|
||||
local torbrowser_state
|
||||
torbrowser_state=$(_state "torbrowser-launcher")
|
||||
local mullvadbrowser_state
|
||||
mullvadbrowser_state=$(_state "mullvad-browser")
|
||||
local protonvpn_state
|
||||
protonvpn_state=$(_state "protonvpn")
|
||||
items+=(
|
||||
"chromium" "Chromium web browser" "$chromium_state"
|
||||
"dillo" "Lightweight graphical browser" "$dillo_state"
|
||||
"epiphany-browser" "GNOME web browser" "$epiphany_state"
|
||||
"falkon" "KDE web browser (QtWebEngine)" "$falkon_state"
|
||||
"firefox" "Firefox from Mozilla (replaces ESR)" "$firefox_state"
|
||||
"firefox-esr" "Firefox ESR (official Debian + locale auto)" "$firefox_esr_state"
|
||||
"floorp" "Firefox-based browser (extrepo)" "$floorp_state"
|
||||
"konqueror" "KDE file manager / web browser" "$konqueror_state"
|
||||
"librewolf" "Privacy-focused Firefox fork (extrepo)" "$librewolf_state"
|
||||
"palemoon" "Classic Firefox-derived browser (extrepo)" "$palemoon_state"
|
||||
"privacybrowser" "Privacy-focused web browser" "$privacybrowser_state"
|
||||
"qutebrowser" "Keyboard-driven browser (Qt)" "$qutebrowser_state"
|
||||
"thunderbird" "Email client" "$thunderbird_state"
|
||||
"torbrowser-launcher" "Tor Browser launcher" "$torbrowser_state"
|
||||
"mullvad-browser" "Mullvad privacy browser" "$mullvadbrowser_state"
|
||||
"protonvpn" "ProtonVPN client" "$protonvpn_state"
|
||||
"chromium" "Chromium web browser" "$chromium_state"
|
||||
"dillo" "Lightweight graphical browser" "$dillo_state"
|
||||
"epiphany-browser" "GNOME web browser" "$epiphany_state"
|
||||
"falkon" "KDE web browser (QtWebEngine)" "$falkon_state"
|
||||
"firefox" "Firefox from Mozilla (replaces ESR)" "$firefox_state"
|
||||
"firefox-esr" "Firefox ESR (official Debian + locale auto)" "$firefox_esr_state"
|
||||
"floorp" "Firefox-based browser (extrepo)" "$floorp_state"
|
||||
"konqueror" "KDE file manager / web browser" "$konqueror_state"
|
||||
"librewolf" "Privacy-focused Firefox fork (extrepo)" "$librewolf_state"
|
||||
"palemoon" "Classic Firefox-derived browser (extrepo)" "$palemoon_state"
|
||||
"privacybrowser" "Privacy-focused web browser" "$privacybrowser_state"
|
||||
"qutebrowser" "Keyboard-driven browser (Qt)" "$qutebrowser_state"
|
||||
"thunderbird" "Email client" "$thunderbird_state"
|
||||
"torbrowser-launcher" "Tor Browser launcher" "$torbrowser_state"
|
||||
"mullvad-browser" "Mullvad privacy browser" "$mullvadbrowser_state"
|
||||
"protonvpn" "ProtonVPN client" "$protonvpn_state"
|
||||
)
|
||||
fi
|
||||
local elinks_state; elinks_state=$(_state "elinks")
|
||||
local riseupvpn_state; riseupvpn_state=$(_state "riseup-vpn")
|
||||
local w3m_state; w3m_state=$(_state "w3m")
|
||||
local tailscale_state; tailscale_state=$(_state "tailscale")
|
||||
local mullvad_state; mullvad_state=$(_state "mullvad-vpn")
|
||||
local elinks_state
|
||||
elinks_state=$(_state "elinks")
|
||||
local riseupvpn_state
|
||||
riseupvpn_state=$(_state "riseup-vpn")
|
||||
local w3m_state
|
||||
w3m_state=$(_state "w3m")
|
||||
local tailscale_state
|
||||
tailscale_state=$(_state "tailscale")
|
||||
local mullvad_state
|
||||
mullvad_state=$(_state "mullvad-vpn")
|
||||
items+=(
|
||||
"elinks" "Text-mode web browser" "$elinks_state"
|
||||
"riseup-vpn" "Riseup VPN client" "$riseupvpn_state"
|
||||
"w3m" "Text-mode browser + deps (w3m-img)" "$w3m_state"
|
||||
"tailscale" "Zero-config VPN & mesh networking" "$tailscale_state"
|
||||
"mullvad-vpn" "Mullvad VPN client (WireGuard)" "$mullvad_state"
|
||||
"elinks" "Text-mode web browser" "$elinks_state"
|
||||
"riseup-vpn" "Riseup VPN client" "$riseupvpn_state"
|
||||
"w3m" "Text-mode browser + deps (w3m-img)" "$w3m_state"
|
||||
"tailscale" "Zero-config VPN & mesh networking" "$tailscale_state"
|
||||
"mullvad-vpn" "Mullvad VPN client (WireGuard)" "$mullvad_state"
|
||||
)
|
||||
|
||||
local item_count=${#items[@]}
|
||||
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
||||
local choices
|
||||
choices=$(_checklist "Internet" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}" \
|
||||
)
|
||||
choices=$(
|
||||
_checklist "Internet" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}"
|
||||
)
|
||||
clear
|
||||
|
||||
[ -z "$choices" ] && return
|
||||
|
||||
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
|
||||
local has_firefox=false
|
||||
local has_firefox_esr=false
|
||||
@@ -194,76 +215,76 @@ _cat_internet() {
|
||||
if $has_firefox && $has_firefox_esr; then
|
||||
fchoice=$(_menu "Firefox" "You selected both Firefox (Mozilla) and Firefox ESR.\nWhat do you want to do?" 12 60 3 \
|
||||
"mozilla" "Remove Firefox ESR — keep Firefox" \
|
||||
"esr" "Remove Firefox — keep Firefox ESR" \
|
||||
"both" "Keep both variants")
|
||||
"esr" "Remove Firefox — keep Firefox ESR" \
|
||||
"both" "Keep both variants")
|
||||
[ -z "$fchoice" ] && return
|
||||
case "$fchoice" in
|
||||
mozilla) cleaned=$(printf '%s\n' $cleaned | grep -vx "firefox-esr" | tr '\n' ' ') ;;
|
||||
esr) cleaned=$(printf '%s\n' $cleaned | grep -vx "firefox" | tr '\n' ' ') ;;
|
||||
mozilla) cleaned=$(printf '%s\n' $cleaned | grep -vx "firefox-esr" | tr '\n' ' ') ;;
|
||||
esr) cleaned=$(printf '%s\n' $cleaned | grep -vx "firefox" | tr '\n' ' ') ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for pkg in $cleaned; do
|
||||
case $pkg in
|
||||
firefox)
|
||||
install_firefox_mozilla "$fchoice"
|
||||
;;
|
||||
firefox-esr)
|
||||
install_firefox_esr "$fchoice"
|
||||
;;
|
||||
floorp)
|
||||
_enable_floorp_repo
|
||||
_run_install floorp
|
||||
echo -e "${GREEN}Floorp installed.${NC}"
|
||||
;;
|
||||
librewolf)
|
||||
_enable_librewolf_repo
|
||||
_run_install librewolf
|
||||
echo -e "${GREEN}LibreWolf installed.${NC}"
|
||||
;;
|
||||
palemoon)
|
||||
install_palemoon
|
||||
;;
|
||||
tailscale)
|
||||
_enable_tailscale_repo
|
||||
_run_install tailscale
|
||||
echo -e "${GREEN}Tailscale installed.${NC}"
|
||||
;;
|
||||
mullvad-vpn)
|
||||
_enable_mullvad_repo
|
||||
_run_install mullvad-vpn
|
||||
echo -e "${GREEN}Mullvad VPN installed.${NC}"
|
||||
;;
|
||||
mullvad-browser)
|
||||
_enable_mullvad_repo
|
||||
_run_install mullvad-browser
|
||||
echo -e "${GREEN}Mullvad Browser installed.${NC}"
|
||||
;;
|
||||
protonvpn)
|
||||
install_protonvpn
|
||||
;;
|
||||
riseup-vpn)
|
||||
install_backports_or_stable riseup-vpn
|
||||
;;
|
||||
w3m)
|
||||
local need=()
|
||||
! is_installed "w3m" && need+=("w3m")
|
||||
! is_installed "w3m-img" && need+=("w3m-img")
|
||||
! is_installed "ca-certificates" && need+=("ca-certificates")
|
||||
! is_installed "xsel" && need+=("xsel")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch w3m w3m-img ca-certificates xsel
|
||||
else
|
||||
echo "w3m already installed."
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
firefox)
|
||||
install_firefox_mozilla "$fchoice"
|
||||
;;
|
||||
firefox-esr)
|
||||
install_firefox_esr "$fchoice"
|
||||
;;
|
||||
floorp)
|
||||
_enable_floorp_repo
|
||||
_run_install floorp
|
||||
echo -e "${GREEN}Floorp installed.${NC}"
|
||||
;;
|
||||
librewolf)
|
||||
_enable_librewolf_repo
|
||||
_run_install librewolf
|
||||
echo -e "${GREEN}LibreWolf installed.${NC}"
|
||||
;;
|
||||
palemoon)
|
||||
install_palemoon
|
||||
;;
|
||||
tailscale)
|
||||
_enable_tailscale_repo
|
||||
_run_install tailscale
|
||||
echo -e "${GREEN}Tailscale installed.${NC}"
|
||||
;;
|
||||
mullvad-vpn)
|
||||
_enable_mullvad_repo
|
||||
_run_install mullvad-vpn
|
||||
echo -e "${GREEN}Mullvad VPN installed.${NC}"
|
||||
;;
|
||||
mullvad-browser)
|
||||
_enable_mullvad_repo
|
||||
_run_install mullvad-browser
|
||||
echo -e "${GREEN}Mullvad Browser installed.${NC}"
|
||||
;;
|
||||
protonvpn)
|
||||
install_protonvpn
|
||||
;;
|
||||
riseup-vpn)
|
||||
install_backports_or_stable riseup-vpn
|
||||
;;
|
||||
w3m)
|
||||
local need=()
|
||||
! is_installed "w3m" && need+=("w3m")
|
||||
! is_installed "w3m-img" && need+=("w3m-img")
|
||||
! is_installed "ca-certificates" && need+=("ca-certificates")
|
||||
! is_installed "xsel" && need+=("xsel")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch w3m w3m-img ca-certificates xsel
|
||||
else
|
||||
echo "w3m already installed."
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -284,22 +305,22 @@ install_firefox_mozilla() {
|
||||
|
||||
if is_installed "firefox-esr"; then
|
||||
case "$fchoice" in
|
||||
both)
|
||||
echo -e "${CYAN}[INFO] Keeping Firefox ESR (both selected).${NC}"
|
||||
;;
|
||||
mozilla)
|
||||
echo "Removing Firefox ESR (as selected)..."
|
||||
both)
|
||||
echo -e "${CYAN}[INFO] Keeping Firefox ESR (both selected).${NC}"
|
||||
;;
|
||||
mozilla)
|
||||
echo "Removing Firefox ESR (as selected)..."
|
||||
sudo apt remove -y firefox-esr
|
||||
;;
|
||||
*)
|
||||
if _confirm "Firefox ESR" "Firefox ESR is installed.\nRemove it before installing Mozilla Firefox?"; then
|
||||
echo "Removing Firefox ESR..."
|
||||
sudo apt remove -y firefox-esr
|
||||
;;
|
||||
*)
|
||||
if _confirm "Firefox ESR" "Firefox ESR is installed.\nRemove it before installing Mozilla Firefox?"; then
|
||||
echo "Removing Firefox ESR..."
|
||||
sudo apt remove -y firefox-esr
|
||||
else
|
||||
echo "Keeping Firefox ESR."
|
||||
return
|
||||
fi
|
||||
;;
|
||||
else
|
||||
echo "Keeping Firefox ESR."
|
||||
return
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -317,22 +338,22 @@ install_firefox_esr() {
|
||||
|
||||
if command -v firefox &>/dev/null; then
|
||||
case "$fchoice" in
|
||||
both)
|
||||
echo -e "${CYAN}[INFO] Keeping Mozilla Firefox (both selected).${NC}"
|
||||
;;
|
||||
esr)
|
||||
echo "Removing Mozilla Firefox (as selected)..."
|
||||
both)
|
||||
echo -e "${CYAN}[INFO] Keeping Mozilla Firefox (both selected).${NC}"
|
||||
;;
|
||||
esr)
|
||||
echo "Removing Mozilla Firefox (as selected)..."
|
||||
sudo apt remove -y firefox
|
||||
;;
|
||||
*)
|
||||
if _confirm "Firefox" "Mozilla Firefox is installed.\nRemove it before installing Firefox ESR?"; then
|
||||
echo "Removing Mozilla Firefox..."
|
||||
sudo apt remove -y firefox
|
||||
;;
|
||||
*)
|
||||
if _confirm "Firefox" "Mozilla Firefox is installed.\nRemove it before installing Firefox ESR?"; then
|
||||
echo "Removing Mozilla Firefox..."
|
||||
sudo apt remove -y firefox
|
||||
else
|
||||
echo "Keeping Mozilla Firefox."
|
||||
return
|
||||
fi
|
||||
;;
|
||||
else
|
||||
echo "Keeping Mozilla Firefox."
|
||||
return
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
+10
-4
@@ -10,18 +10,21 @@ _enable_temurin_repo() {
|
||||
_run_cmd "extrepo" "sudo apt install -y extrepo" "Installing extrepo..."
|
||||
fi
|
||||
_run_cmd "Temurin" "sudo extrepo enable temurin" "Enabling Adoptium Temurin repository..."
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_minecraft_java() {
|
||||
local choices
|
||||
choices=$(_checklist "Java Runtimes for Minecraft" \
|
||||
"Select Java version(s) to install:" 15 65 4 \
|
||||
"8" "Java 8 — Classic mods & Minecraft <= 1.16.5" OFF \
|
||||
"8" "Java 8 — Classic mods & Minecraft <= 1.16.5" OFF \
|
||||
"17" "Java 17 — Minecraft 1.17 to 1.20.4" ON \
|
||||
"21" "Java 21 — Modern Minecraft >= 1.20.5 & 1.21+" OFF \
|
||||
"25" "Java 25 — Minecraft 26+" OFF)
|
||||
[ -z "$choices" ] && { echo "No Java version selected."; return; }
|
||||
[ -z "$choices" ] && {
|
||||
echo "No Java version selected."
|
||||
return
|
||||
}
|
||||
_enable_temurin_repo
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
@@ -38,7 +41,10 @@ _install_dev_java() {
|
||||
"17" "Java 17 LTS Development Kit" \
|
||||
"21" "Java 21 LTS Development Kit" \
|
||||
"25" "Java 25 LTS Development Kit")
|
||||
[ -z "$ver" ] && { echo "No JDK version selected."; return; }
|
||||
[ -z "$ver" ] && {
|
||||
echo "No JDK version selected."
|
||||
return
|
||||
}
|
||||
_enable_temurin_repo
|
||||
_run_install "temurin-${ver}-jdk"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ _enable_onlyoffice_repo() {
|
||||
fi
|
||||
_run_cmd "OnlyOffice" "sudo extrepo enable onlyoffice-desktopeditors" "Enabling OnlyOffice repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_onlyoffice() {
|
||||
@@ -36,7 +36,7 @@ install_joplin() {
|
||||
if [ ! -f /etc/apt/sources.list.d/extrepo_joplin.sources ]; then
|
||||
_run_cmd "Joplin" "sudo extrepo enable joplin" "Enabling Joplin repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
if ! is_installed "joplin"; then
|
||||
_run_cmd "Joplin" "sudo apt install -y joplin" "Installing Joplin..."
|
||||
echo -e "${GREEN}Joplin installed.${NC}"
|
||||
@@ -84,8 +84,8 @@ _cat_office() {
|
||||
local -a items=()
|
||||
if ! $headless; then
|
||||
items+=(
|
||||
"onlyoffice" "OnlyOffice Desktop Editors (extrepo)" OFF
|
||||
"libreoffice" "LibreOffice (backports on Bookworm/Trixie)" OFF
|
||||
"onlyoffice" "OnlyOffice Desktop Editors (extrepo)" OFF
|
||||
"libreoffice" "LibreOffice (backports on Bookworm/Trixie)" OFF
|
||||
)
|
||||
if [ "$DEBIAN_VERSION" = "12" ] || [ "$DEBIAN_VERSION" = "13" ]; then
|
||||
items+=(
|
||||
@@ -97,18 +97,20 @@ _cat_office() {
|
||||
local item_count=${#items[@]}
|
||||
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
||||
local choices
|
||||
choices=$(_checklist "Office & Productivity" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}" \
|
||||
)
|
||||
choices=$(
|
||||
_checklist "Office & Productivity" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}"
|
||||
)
|
||||
|
||||
[ -z "$choices" ] && return
|
||||
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
|
||||
for pkg in $cleaned; do
|
||||
case $pkg in
|
||||
onlyoffice) install_onlyoffice ;;
|
||||
libreoffice) install_libreoffice_bpo ;;
|
||||
joplin) install_joplin ;;
|
||||
onlyoffice) install_onlyoffice ;;
|
||||
libreoffice) install_libreoffice_bpo ;;
|
||||
joplin) install_joplin ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
@@ -5,64 +5,77 @@ _cat_programming() {
|
||||
local headless=false
|
||||
_is_headless && headless=true
|
||||
local -a items=()
|
||||
local vim_state; vim_state=$(_state "vim")
|
||||
local neovim_state; neovim_state=$(_state "neovim")
|
||||
local hx_state; hx_state=$(_state "hx")
|
||||
local nano_state; nano_state=$(_state "nano")
|
||||
local emacs_state; emacs_state=$(_state "emacs")
|
||||
local vim_state
|
||||
vim_state=$(_state "vim")
|
||||
local neovim_state
|
||||
neovim_state=$(_state "neovim")
|
||||
local hx_state
|
||||
hx_state=$(_state "hx")
|
||||
local nano_state
|
||||
nano_state=$(_state "nano")
|
||||
local emacs_state
|
||||
emacs_state=$(_state "emacs")
|
||||
items+=(
|
||||
"vim" "Classic terminal editor" "$vim_state"
|
||||
"neovim" "Modern vim fork" "$neovim_state"
|
||||
"hx" "Helix modal editor (Rust)" "$hx_state"
|
||||
"nano" "Simple terminal editor" "$nano_state"
|
||||
"emacs" "Extensible editor / IDE" "$emacs_state"
|
||||
"vim" "Classic terminal editor" "$vim_state"
|
||||
"neovim" "Modern vim fork" "$neovim_state"
|
||||
"hx" "Helix modal editor (Rust)" "$hx_state"
|
||||
"nano" "Simple terminal editor" "$nano_state"
|
||||
"emacs" "Extensible editor / IDE" "$emacs_state"
|
||||
)
|
||||
if ! $headless; then
|
||||
local vimgtk_state; vimgtk_state=$(_state "vim-gtk3")
|
||||
local kate_state; kate_state=$(_state "kate")
|
||||
local mousepad_state; mousepad_state=$(_state "mousepad")
|
||||
local gedit_state; gedit_state=$(_state "gedit")
|
||||
local geany_state; geany_state=$(_state "geany")
|
||||
local gte_state; gte_state=$(_state "gnome-text-editor")
|
||||
local vimgtk_state
|
||||
vimgtk_state=$(_state "vim-gtk3")
|
||||
local kate_state
|
||||
kate_state=$(_state "kate")
|
||||
local mousepad_state
|
||||
mousepad_state=$(_state "mousepad")
|
||||
local gedit_state
|
||||
gedit_state=$(_state "gedit")
|
||||
local geany_state
|
||||
geany_state=$(_state "geany")
|
||||
local gte_state
|
||||
gte_state=$(_state "gnome-text-editor")
|
||||
local codium_state="OFF"
|
||||
if command -v codium &>/dev/null; then
|
||||
codium_state="ON"
|
||||
fi
|
||||
items+=(
|
||||
"vim-gtk3" "Vim with GTK3 GUI" "$vimgtk_state"
|
||||
"kate" "KDE advanced text editor" "$kate_state"
|
||||
"mousepad" "Xfce text editor" "$mousepad_state"
|
||||
"gedit" "GNOME text editor" "$gedit_state"
|
||||
"geany" "Lightweight IDE" "$geany_state"
|
||||
"gnome-text-editor" "GNOME modern text editor" "$gte_state"
|
||||
"vscodium" "VS Code open-source (extrepo)" "$codium_state"
|
||||
"vim-gtk3" "Vim with GTK3 GUI" "$vimgtk_state"
|
||||
"kate" "KDE advanced text editor" "$kate_state"
|
||||
"mousepad" "Xfce text editor" "$mousepad_state"
|
||||
"gedit" "GNOME text editor" "$gedit_state"
|
||||
"geany" "Lightweight IDE" "$geany_state"
|
||||
"gnome-text-editor" "GNOME modern text editor" "$gte_state"
|
||||
"vscodium" "VS Code open-source (extrepo)" "$codium_state"
|
||||
)
|
||||
fi
|
||||
|
||||
local item_count=${#items[@]}
|
||||
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
||||
local choices
|
||||
choices=$(_checklist "Programming Applications" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}" \
|
||||
)
|
||||
choices=$(
|
||||
_checklist "Programming Applications" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}"
|
||||
)
|
||||
clear
|
||||
|
||||
[ -z "$choices" ] && return
|
||||
|
||||
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
|
||||
for pkg in $cleaned; do
|
||||
case $pkg in
|
||||
vscodium)
|
||||
install_vscodium
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
vscodium)
|
||||
install_vscodium
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -76,7 +89,7 @@ _enable_vscodium_repo() {
|
||||
fi
|
||||
_run_cmd "VSCodium" "sudo extrepo enable vscodium" "Enabling VSCodium repository..."
|
||||
fi
|
||||
_run_cmd "APT Update" "sudo apt update" "Updating package lists..."
|
||||
_ensure_apt_updated
|
||||
}
|
||||
|
||||
install_vscodium() {
|
||||
|
||||
+215
-183
@@ -7,10 +7,14 @@ _detect_desktop_type() {
|
||||
desktop="${desktop,,}"
|
||||
|
||||
case "$desktop" in
|
||||
*kde*|*lxqt*|*razor*|*plasma*)
|
||||
echo "qt"; return ;;
|
||||
*gnome*|*xfce*|*cinnamon*|*mate*|*lxde*|*budgie*|*sway*|*hyprland*|*i3*|*bspwm*|*openbox*|*fluxbox*)
|
||||
echo "gtk"; return ;;
|
||||
*kde* | *lxqt* | *razor* | *plasma*)
|
||||
echo "qt"
|
||||
return
|
||||
;;
|
||||
*gnome* | *xfce* | *cinnamon* | *mate* | *lxde* | *budgie* | *sway* | *hyprland* | *i3* | *bspwm* | *openbox* | *fluxbox*)
|
||||
echo "gtk"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "gtk"
|
||||
@@ -20,224 +24,252 @@ _cat_general() {
|
||||
local headless=false
|
||||
_is_headless && headless=true
|
||||
local -a items=()
|
||||
local btop_state; btop_state=$(_state "btop")
|
||||
local btop_state
|
||||
btop_state=$(_state "btop")
|
||||
local compress_state
|
||||
if is_installed "zip" && is_installed "unzip" && is_installed "p7zip-full"; then
|
||||
compress_state="ON"
|
||||
else
|
||||
compress_state="OFF"
|
||||
fi
|
||||
local cpufetch_state; cpufetch_state=$(_state "cpufetch")
|
||||
local cpu_x_state; cpu_x_state=$(_state "cpu-x")
|
||||
local cpufetch_state
|
||||
cpufetch_state=$(_state "cpufetch")
|
||||
local cpu_x_state
|
||||
cpu_x_state=$(_state "cpu-x")
|
||||
local curl_wget_state
|
||||
if is_installed "curl" && is_installed "wget"; then
|
||||
curl_wget_state="ON"
|
||||
else
|
||||
curl_wget_state="OFF"
|
||||
fi
|
||||
local extrepo_state; extrepo_state=$(_state "extrepo")
|
||||
local fwupd_state; fwupd_state=$(_state "fwupd")
|
||||
local htop_state; htop_state=$(_state "htop")
|
||||
local inxi_state; inxi_state=$(_state "inxi")
|
||||
local jq_state; jq_state=$(_state "jq")
|
||||
local kvm_state; kvm_state=$(_state "virt-manager")
|
||||
local lshw_state; lshw_state=$(_state "lshw")
|
||||
local mc_state; mc_state=$(_state "mc")
|
||||
local nala_state; nala_state=$(_state "nala")
|
||||
local ncdu_state; ncdu_state=$(_state "ncdu")
|
||||
local tmux_state; tmux_state=$(_state "tmux")
|
||||
local wine_state; wine_state=$(_state "wine")
|
||||
local nvme_state; nvme_state=$(_state "nvme-cli")
|
||||
local extrepo_state
|
||||
extrepo_state=$(_state "extrepo")
|
||||
local fwupd_state
|
||||
fwupd_state=$(_state "fwupd")
|
||||
local htop_state
|
||||
htop_state=$(_state "htop")
|
||||
local inxi_state
|
||||
inxi_state=$(_state "inxi")
|
||||
local jq_state
|
||||
jq_state=$(_state "jq")
|
||||
local kvm_state
|
||||
kvm_state=$(_state "virt-manager")
|
||||
local lshw_state
|
||||
lshw_state=$(_state "lshw")
|
||||
local mc_state
|
||||
mc_state=$(_state "mc")
|
||||
local nala_state
|
||||
nala_state=$(_state "nala")
|
||||
local ncdu_state
|
||||
ncdu_state=$(_state "ncdu")
|
||||
local tmux_state
|
||||
tmux_state=$(_state "tmux")
|
||||
local wine_state
|
||||
wine_state=$(_state "wine")
|
||||
local nvme_state
|
||||
nvme_state=$(_state "nvme-cli")
|
||||
items+=(
|
||||
"btop" "Resource monitor (fancy top)" "$btop_state"
|
||||
"compress" "Compression tools (zip, unrar, 7z)" "$compress_state"
|
||||
"cpufetch" "CPU info fetcher" "$cpufetch_state"
|
||||
"cpu-x" "CPU-X (alternative to CPU-Z)" "$cpu_x_state"
|
||||
"curl-wget" "HTTP transfer tools (curl, wget)" "$curl_wget_state"
|
||||
"extrepo" "External repository manager" "$extrepo_state"
|
||||
"fwupd" "Firmware update daemon" "$fwupd_state"
|
||||
"htop" "Interactive process viewer" "$htop_state"
|
||||
"inxi" "System information tool" "$inxi_state"
|
||||
"jq" "JSON command-line processor" "$jq_state"
|
||||
"kvm" "QEMU/KVM virtualization" "$kvm_state"
|
||||
"lshw" "List hardware details" "$lshw_state"
|
||||
"mc" "Midnight Commander (file manager)" "$mc_state"
|
||||
"nala" "APT frontend (parallel downloads)" "$nala_state"
|
||||
"ncdu" "Disk usage analyzer (ncurses)" "$ncdu_state"
|
||||
"nvme-cli" "NVMe SSD health monitoring" "$nvme_state"
|
||||
"tmux" "Terminal multiplexer" "$tmux_state"
|
||||
"wine" "Windows compatibility layer" "$wine_state"
|
||||
"btop" "Resource monitor (fancy top)" "$btop_state"
|
||||
"compress" "Compression tools (zip, unrar, 7z)" "$compress_state"
|
||||
"cpufetch" "CPU info fetcher" "$cpufetch_state"
|
||||
"cpu-x" "CPU-X (alternative to CPU-Z)" "$cpu_x_state"
|
||||
"curl-wget" "HTTP transfer tools (curl, wget)" "$curl_wget_state"
|
||||
"extrepo" "External repository manager" "$extrepo_state"
|
||||
"fwupd" "Firmware update daemon" "$fwupd_state"
|
||||
"htop" "Interactive process viewer" "$htop_state"
|
||||
"inxi" "System information tool" "$inxi_state"
|
||||
"jq" "JSON command-line processor" "$jq_state"
|
||||
"kvm" "QEMU/KVM virtualization" "$kvm_state"
|
||||
"lshw" "List hardware details" "$lshw_state"
|
||||
"mc" "Midnight Commander (file manager)" "$mc_state"
|
||||
"nala" "APT frontend (parallel downloads)" "$nala_state"
|
||||
"ncdu" "Disk usage analyzer (ncurses)" "$ncdu_state"
|
||||
"nvme-cli" "NVMe SSD health monitoring" "$nvme_state"
|
||||
"tmux" "Terminal multiplexer" "$tmux_state"
|
||||
"wine" "Windows compatibility layer" "$wine_state"
|
||||
)
|
||||
if ! $headless; then
|
||||
local bleachbit_state; bleachbit_state=$(_state "bleachbit")
|
||||
local conky_state; conky_state=$(_state "conky")
|
||||
local gdebi_state; gdebi_state=$(_state "gdebi")
|
||||
local corectrl_state; corectrl_state=$(_state "corectrl")
|
||||
local dcgtk_state; dcgtk_state=$(_state "doublecmd-gtk")
|
||||
local dcqt_state; dcqt_state=$(_state "doublecmd-qt")
|
||||
local disks_state; disks_state=$(_state "gnome-disk-utility")
|
||||
local gparted_state; gparted_state=$(_state "gparted")
|
||||
local hardinfo_state; hardinfo_state=$(_state "hardinfo")
|
||||
local psensor_state; psensor_state=$(_state "psensor")
|
||||
local timeshift_state; timeshift_state=$(_state "timeshift")
|
||||
local bleachbit_state
|
||||
bleachbit_state=$(_state "bleachbit")
|
||||
local conky_state
|
||||
conky_state=$(_state "conky-all")
|
||||
local gdebi_state
|
||||
gdebi_state=$(_state "gdebi")
|
||||
local corectrl_state
|
||||
corectrl_state=$(_state "corectrl")
|
||||
local dcgtk_state
|
||||
dcgtk_state=$(_state "doublecmd-gtk")
|
||||
local dcqt_state
|
||||
dcqt_state=$(_state "doublecmd-qt")
|
||||
local disks_state
|
||||
disks_state=$(_state "gnome-disk-utility")
|
||||
local gparted_state
|
||||
gparted_state=$(_state "gparted")
|
||||
local hardinfo_state
|
||||
hardinfo_state=$(_state "hardinfo")
|
||||
local psensor_state
|
||||
psensor_state=$(_state "psensor")
|
||||
local timeshift_state
|
||||
timeshift_state=$(_state "timeshift")
|
||||
items+=(
|
||||
"bleachbit" "System cleaner (GUI)" "$bleachbit_state"
|
||||
"conky" "System monitor for desktop" "$conky_state"
|
||||
"gdebi" "Install .deb packages with deps" "$gdebi_state"
|
||||
"corectrl" "AMD GPU control (CoreCtrl)" "$corectrl_state"
|
||||
"doublecmd-gtk" "Dual-panel file manager (GTK)" "$dcgtk_state"
|
||||
"doublecmd-qt" "Dual-panel file manager (Qt)" "$dcqt_state"
|
||||
"gnome-disk-utility" "Disk management GUI" "$disks_state"
|
||||
"gparted" "GNOME partition editor" "$gparted_state"
|
||||
"hardinfo" "Graphical system profiler" "$hardinfo_state"
|
||||
"psensor" "Hardware temperature monitor" "$psensor_state"
|
||||
"timeshift" "System restore snapshots" "$timeshift_state"
|
||||
"bleachbit" "System cleaner (GUI)" "$bleachbit_state"
|
||||
"conky-all" "System monitor for desktop" "$conky_state"
|
||||
"gdebi" "Install .deb packages with deps" "$gdebi_state"
|
||||
"corectrl" "AMD GPU control (CoreCtrl)" "$corectrl_state"
|
||||
"doublecmd-gtk" "Dual-panel file manager (GTK)" "$dcgtk_state"
|
||||
"doublecmd-qt" "Dual-panel file manager (Qt)" "$dcqt_state"
|
||||
"gnome-disk-utility" "Disk management GUI" "$disks_state"
|
||||
"gparted" "GNOME partition editor" "$gparted_state"
|
||||
"hardinfo" "Graphical system profiler" "$hardinfo_state"
|
||||
"psensor" "Hardware temperature monitor" "$psensor_state"
|
||||
"timeshift" "System restore snapshots" "$timeshift_state"
|
||||
)
|
||||
fi
|
||||
|
||||
local item_count=${#items[@]}
|
||||
local lista_alto=$((item_count > TUI_ALTO_LISTA ? TUI_ALTO_LISTA : item_count))
|
||||
local choices
|
||||
choices=$(_checklist "System Tools" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}" \
|
||||
)
|
||||
choices=$(
|
||||
_checklist "System Tools" "Check [*] the packages you want installed/updated on your system.\n" $TUI_ALTO $TUI_ANCHO $lista_alto \
|
||||
"${items[@]}"
|
||||
)
|
||||
clear
|
||||
|
||||
[ -z "$choices" ] && return
|
||||
|
||||
local cleaned; cleaned=$(echo "$choices" | tr -d '"')
|
||||
local cleaned
|
||||
cleaned=$(echo "$choices" | tr -d '"')
|
||||
|
||||
for pkg in $cleaned; do
|
||||
case $pkg in
|
||||
compress)
|
||||
local need=()
|
||||
! is_installed "zip" && need+=("zip")
|
||||
! is_installed "unzip" && need+=("unzip")
|
||||
! is_installed "rar" && need+=("rar")
|
||||
! is_installed "unrar" && need+=("unrar")
|
||||
! is_installed "p7zip-full" && need+=("p7zip-full")
|
||||
! is_installed "p7zip-rar" && need+=("p7zip-rar")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch "${need[@]}"
|
||||
echo -e "${GREEN}Compression utilities installed.${NC}"
|
||||
fi
|
||||
;;
|
||||
curl-wget)
|
||||
local need=()
|
||||
! is_installed "curl" && need+=("curl")
|
||||
! is_installed "wget" && need+=("wget")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch "${need[@]}"
|
||||
else
|
||||
echo "curl and wget already installed."
|
||||
fi
|
||||
;;
|
||||
extrepo)
|
||||
install_backports_or_stable extrepo
|
||||
;;
|
||||
fwupd)
|
||||
if ! is_installed "fwupd"; then
|
||||
_run_cmd "fwupd" "sudo apt install -y fwupd" "Installing fwupd..."
|
||||
else
|
||||
echo "fwupd already installed."
|
||||
fi
|
||||
if _confirm "Firmware Scan" "Scan for firmware updates now?\n\nThis will run:\n fwupdmgr refresh\n fwupdmgr get-updates\n fwupdmgr update (if available)"; then
|
||||
_run_cmd "fwupd" "sudo fwupdmgr refresh --force" "Refreshing firmware metadata..."
|
||||
echo ""
|
||||
echo "Checking for firmware updates..."
|
||||
sudo fwupdmgr get-updates 2>&1 || true
|
||||
if sudo fwupdmgr get-updates 2>&1 | grep -q "available"; then
|
||||
if _confirm "Firmware Update" "Firmware updates are available.\nInstall them now?"; then
|
||||
_run_cmd "fwupd" "sudo fwupdmgr update -y" "Installing firmware updates..."
|
||||
else
|
||||
echo "Skipping firmware update."
|
||||
_pause
|
||||
fi
|
||||
compress)
|
||||
local need=()
|
||||
! is_installed "zip" && need+=("zip")
|
||||
! is_installed "unzip" && need+=("unzip")
|
||||
! is_installed "rar" && need+=("rar")
|
||||
! is_installed "unrar" && need+=("unrar")
|
||||
! is_installed "p7zip-full" && need+=("p7zip-full")
|
||||
! is_installed "p7zip-rar" && need+=("p7zip-rar")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch "${need[@]}"
|
||||
echo -e "${GREEN}Compression utilities installed.${NC}"
|
||||
fi
|
||||
;;
|
||||
curl-wget)
|
||||
local need=()
|
||||
! is_installed "curl" && need+=("curl")
|
||||
! is_installed "wget" && need+=("wget")
|
||||
if [ ${#need[@]} -gt 0 ]; then
|
||||
_run_install_batch "${need[@]}"
|
||||
else
|
||||
echo "curl and wget already installed."
|
||||
fi
|
||||
;;
|
||||
extrepo)
|
||||
install_backports_or_stable extrepo
|
||||
;;
|
||||
fwupd)
|
||||
if ! is_installed "fwupd"; then
|
||||
_run_cmd "fwupd" "sudo apt install -y fwupd" "Installing fwupd..."
|
||||
else
|
||||
echo "fwupd already installed."
|
||||
fi
|
||||
if _confirm "Firmware Scan" "Scan for firmware updates now?\n\nThis will run:\n fwupdmgr refresh\n fwupdmgr get-updates\n fwupdmgr update (if available)"; then
|
||||
_run_cmd "fwupd" "sudo fwupdmgr refresh --force" "Refreshing firmware metadata..."
|
||||
echo ""
|
||||
echo "Checking for firmware updates..."
|
||||
sudo fwupdmgr get-updates 2>&1 || true
|
||||
if sudo fwupdmgr get-updates 2>&1 | grep -q "available"; then
|
||||
if _confirm "Firmware Update" "Firmware updates are available.\nInstall them now?"; then
|
||||
_run_cmd "fwupd" "sudo fwupdmgr update -y" "Installing firmware updates..."
|
||||
else
|
||||
echo "No firmware updates available."
|
||||
echo "Skipping firmware update."
|
||||
_pause
|
||||
fi
|
||||
else
|
||||
echo "No firmware updates available."
|
||||
_pause
|
||||
fi
|
||||
fi
|
||||
echo -e "${GREEN}fwupd setup complete.${NC}"
|
||||
_pause
|
||||
;;
|
||||
kvm)
|
||||
if ! is_installed "virt-manager"; then
|
||||
_run_cmd "KVM" "sudo apt install -y qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients bridge-utils virt-manager" "Installing KVM..."
|
||||
sudo adduser "$USER" libvirt 2>/dev/null || true
|
||||
sudo adduser "$USER" kvm 2>/dev/null || true
|
||||
echo -e "${GREEN}QEMU/KVM installed. A reboot is recommended.${NC}"
|
||||
fi
|
||||
echo -e "${GREEN}fwupd setup complete.${NC}"
|
||||
_pause
|
||||
;;
|
||||
kvm)
|
||||
if ! is_installed "virt-manager"; then
|
||||
_run_cmd "KVM" "sudo apt install -y qemu-system-x86 qemu-utils libvirt-daemon-system libvirt-clients bridge-utils virt-manager" "Installing KVM..."
|
||||
sudo adduser "$USER" libvirt 2>/dev/null || true
|
||||
sudo adduser "$USER" kvm 2>/dev/null || true
|
||||
echo -e "${GREEN}QEMU/KVM installed. A reboot is recommended.${NC}"
|
||||
else
|
||||
echo "QEMU/KVM already installed."
|
||||
fi
|
||||
;;
|
||||
wine)
|
||||
if ! is_installed "wine64"; then
|
||||
_run_cmd "Wine" "sudo apt install -y --no-install-recommends wine64 fonts-wine" "Installing Wine (64-bit only)..."
|
||||
local wine_ver
|
||||
wine_ver=$(wine --version 2>/dev/null)
|
||||
if [ -n "$wine_ver" ]; then
|
||||
echo -e "${GREEN}Wine (64-bit) installed: ${wine_ver}${NC}"
|
||||
else
|
||||
echo "QEMU/KVM already installed."
|
||||
echo -e "${YELLOW}Wine installed but version check failed.${NC}"
|
||||
fi
|
||||
;;
|
||||
wine)
|
||||
if ! is_installed "wine64"; then
|
||||
_run_cmd "Wine" "sudo apt install -y --no-install-recommends wine64 fonts-wine" "Installing Wine (64-bit only)..."
|
||||
local wine_ver
|
||||
wine_ver=$(wine --version 2>/dev/null)
|
||||
if [ -n "$wine_ver" ]; then
|
||||
echo -e "${GREEN}Wine (64-bit) installed: ${wine_ver}${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}Wine installed but version check failed.${NC}"
|
||||
fi
|
||||
else
|
||||
echo "Wine64 already installed."
|
||||
fi
|
||||
;;
|
||||
nvme-cli)
|
||||
if ! timeout 2 lsblk -d -o TRAN 2>/dev/null | grep -q "^nvme$"; then
|
||||
echo "No NVMe controller detected. Skipping."
|
||||
continue
|
||||
fi
|
||||
if ! is_installed "nvme-cli"; then
|
||||
_run_cmd "nvme-cli" "sudo apt install -y nvme-cli" "Installing nvme-cli..."
|
||||
fi
|
||||
local nvme_devs=()
|
||||
while read -r dev; do
|
||||
nvme_devs+=("$dev")
|
||||
done < <(timeout 2 lsblk -d -o NAME,TRAN 2>/dev/null | awk '$2 == "nvme" {print $1}')
|
||||
if [ ${#nvme_devs[@]} -eq 0 ]; then
|
||||
echo "No NVMe block devices found for health check."
|
||||
continue
|
||||
fi
|
||||
local dev_list=""
|
||||
local dev
|
||||
else
|
||||
echo "Wine64 already installed."
|
||||
fi
|
||||
;;
|
||||
nvme-cli)
|
||||
if ! timeout 2 lsblk -d -o TRAN 2>/dev/null | grep -q "^nvme$"; then
|
||||
echo "No NVMe controller detected. Skipping."
|
||||
continue
|
||||
fi
|
||||
if ! is_installed "nvme-cli"; then
|
||||
_run_cmd "nvme-cli" "sudo apt install -y nvme-cli" "Installing nvme-cli..."
|
||||
fi
|
||||
local nvme_devs=()
|
||||
while read -r dev; do
|
||||
nvme_devs+=("$dev")
|
||||
done < <(timeout 2 lsblk -d -o NAME,TRAN 2>/dev/null | awk '$2 == "nvme" {print $1}')
|
||||
if [ ${#nvme_devs[@]} -eq 0 ]; then
|
||||
echo "No NVMe block devices found for health check."
|
||||
continue
|
||||
fi
|
||||
local dev_list=""
|
||||
local dev
|
||||
for dev in "${nvme_devs[@]}"; do
|
||||
[ -n "$dev_list" ] && dev_list+=", "
|
||||
dev_list+="/dev/${dev}"
|
||||
done
|
||||
if _confirm "NVMe Health" "Run smart-log on ${#nvme_devs[@]} NVMe device(s): ${dev_list}?"; then
|
||||
echo ""
|
||||
for dev in "${nvme_devs[@]}"; do
|
||||
[ -n "$dev_list" ] && dev_list+=", "
|
||||
dev_list+="/dev/${dev}"
|
||||
done
|
||||
if _confirm "NVMe Health" "Run smart-log on ${#nvme_devs[@]} NVMe device(s): ${dev_list}?"; then
|
||||
local cw="" temp="" pu=""
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*critical_warning*) cw="${line##*: }" ;;
|
||||
*temperature*) temp="${line##*: }" ;;
|
||||
*percentage_used*) pu="${line##*: }" ;;
|
||||
esac
|
||||
done < <(sudo nvme smart-log "/dev/${dev}" 2>/dev/null || true)
|
||||
echo -e "${YELLOW}━━━ /dev/${dev} ━━━${NC}"
|
||||
echo -e " ${GREEN}Critical Warning:${NC} ${cw:-N/A}"
|
||||
echo -e " ${GREEN}Temperature:${NC} ${temp:-N/A}"
|
||||
echo -e " ${GREEN}Percentage Used:${NC} ${pu:-N/A}"
|
||||
echo ""
|
||||
for dev in "${nvme_devs[@]}"; do
|
||||
local cw="" temp="" pu=""
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*critical_warning*) cw="${line##*: }" ;;
|
||||
*temperature*) temp="${line##*: }" ;;
|
||||
*percentage_used*) pu="${line##*: }" ;;
|
||||
esac
|
||||
done < <(sudo nvme smart-log "/dev/${dev}" 2>/dev/null || true)
|
||||
echo -e "${YELLOW}━━━ /dev/${dev} ━━━${NC}"
|
||||
echo -e " ${GREEN}Critical Warning:${NC} ${cw:-N/A}"
|
||||
echo -e " ${GREEN}Temperature:${NC} ${temp:-N/A}"
|
||||
echo -e " ${GREEN}Percentage Used:${NC} ${pu:-N/A}"
|
||||
echo ""
|
||||
done
|
||||
_pause
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
done
|
||||
_pause
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ! is_installed "$pkg"; then
|
||||
_run_install "$pkg"
|
||||
else
|
||||
echo "$pkg already installed."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo -e "${GREEN}System tools installed.${NC}"
|
||||
_pause
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user