From d88445b34e55b0a5c84e7b1bf8acaa4d9d3caf86 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 04:19:17 +0000 Subject: [PATCH] feat(apps): add dedicated installer for Calibre Integrates the official Calibre e-book manager installer into the `apps.sh` module. This change introduces a new function, `install_calibre`, which: - Checks if Calibre is already installed to prevent re-installation. - Uses the recommended `wget` command to download and execute the official Linux installer script. - Provides clear logging for the installation process. The function is called from the main execution flow, ensuring Calibre is installed alongside other essential applications. --- modules/apps.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/modules/apps.sh b/modules/apps.sh index aa28b7b..148a652 100755 --- a/modules/apps.sh +++ b/modules/apps.sh @@ -143,6 +143,31 @@ install_nvm() { fi } +# --------------------------------------------------------------- +# install_calibre() +# --------------------------------------------------------------- +# Instala Calibre, el gestor de libros electrónicos. +# +# Utiliza el instalador oficial de Calibre para sistemas Linux, +# que descarga y configura la última versión estable. +# --------------------------------------------------------------- +install_calibre() { + log_step "Instalación de Calibre" + + if command_exists calibre; then + log_success "Calibre ya está instalado." + return 0 + fi + + log_info "Instalando Calibre..." + if sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin; then + log_success "Calibre instalado correctamente." + else + log_error "Falló la instalación de Calibre." + return 1 + fi +} + # --------------------------------------------------------------- # run_module_main() # --------------------------------------------------------------- @@ -218,6 +243,9 @@ run_module_main() { # Instalar Homebrew install_homebrew + # Instalar Calibre + install_calibre + log_info "Instalando aplicaciones multimedia..." sudo pacman -S --noconfirm --needed "${PACMAN_MULTIMEDIA[@]}" || { log_warning "Algunos paquetes multimedia no se pudieron instalar"