feat: desktop entry & manpage installation through linutil-installer.sh (#802)

This commit is contained in:
Adam Perkowski 2024-10-24 21:55:56 +02:00 committed by GitHub
parent d39ffad527
commit 51631a16cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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