From 51631a16cb187d09e9ce2c04091e6602bbb3da81 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 24 Oct 2024 21:55:56 +0200 Subject: [PATCH] feat: desktop entry & manpage installation through `linutil-installer.sh` (#802) --- core/tabs/applications-setup/linutil-installer.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/tabs/applications-setup/linutil-installer.sh b/core/tabs/applications-setup/linutil-installer.sh index 4bb241db..fd925e0b 100755 --- a/core/tabs/applications-setup/linutil-installer.sh +++ b/core/tabs/applications-setup/linutil-installer.sh @@ -35,10 +35,10 @@ installLinutil() { printf "%b\n" "${YELLOW}Installing rustup...${RC}" case "$PACKAGER" in pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rustup + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm curl rustup man-db ;; dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y rustup + "$ESCALATION_TOOL" "$PACKAGER" install -y curl rustup man-pages man-db man ;; zypper) "$ESCALATION_TOOL" "$PACKAGER" install -n curl gcc make @@ -54,12 +54,23 @@ installLinutil() { rustup default stable cargo install --force linutil_tui printf "%b\n" "${GREEN}Installed successfully.${RC}" + installExtra ;; *) printf "%b\n" "${RED}Linutil not installed.${RC}" ;; esac esac } +installExtra() { + printf "%b\n" "${YELLOW}Installing the manpage...${RC}" + "$ESCALATION_TOOL" mkdir -p /usr/share/man/man1 + curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/man/linutil.1' | "$ESCALATION_TOOL" tee '/usr/share/man/man1/linutil.1' > /dev/null + printf "%b\n" "${YELLOW}Creating a Desktop Entry...${RC}" + "$ESCALATION_TOOL" mkdir -p /usr/share/applications + curl 'https://raw.githubusercontent.com/ChrisTitusTech/linutil/refs/heads/main/linutil.desktop' | "$ESCALATION_TOOL" tee /usr/share/applications/linutil.desktop > /dev/null + printf "%b\n" "${GREEN}Done.${RC}" +} + checkEnv checkEscalationTool checkAURHelper