Skip to content

Commit

Permalink
AUR Installation
Browse files Browse the repository at this point in the history
  • Loading branch information
adamperkowski committed Sep 19, 2024
1 parent c3eea0d commit f9c9313
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tabs/applications-setup/linutil-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh -e

. ../common-script.sh

installLinutil() {
printf "%b\n" "${YELLOW}Installing Linutil...${RC}"
case "$PACKAGER" in
pacman)
printf "%b\n" "----------------------------"
printf "%b\n" "Select the package to install:"
printf "%b\n" "1. ${CYAN}linutil${RC} (stable release compiled from source)"
printf "%b\n" "2. ${CYAN}linutil-bin${RC} (stable release pre-compiled)"
printf "%b\n" "3. ${CYAN}linutil-git${RC} (compiled from the latest commit)"
printf "%b\n" "----------------------------"
printf "%b\n" "Enter your choice: "
read -r choice
case $choice in
1) "$AUR_HELPER" -S --noconfirm linutil ;;
2) "$AUR_HELPER" -S --noconfirm linutil-bin ;;
3) "$AUR_HELPER" -S --noconfirm linutil-git ;;
*)
printf "%b\n" "${RED}Invalid choice:${RC} $choice"
exit 1
;;
esac
printf "%b\n" "${GREEN}Installed successfully.${RC}"
;;
*)
printf "%b\n" "${RED}There are no official packages for your distro.${RC}"
printf "%b" "${YELLOW}Do you want to install the crates.io package? (y/N) ${RC}"
read -r choice
case $choice in
y|Y)
printf "%b\n" "Work In Progress."
;;
*) printf "%b\n" "${RED}Linutil not installed.${RC}" ;;
esac
esac
}

checkEnv
checkEscalationTool
checkAURHelper
installLinutil
5 changes: 5 additions & 0 deletions tabs/applications-setup/linutil-updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -e

. ../common-script.sh

# WIP: crates have to be updated manually
20 changes: 20 additions & 0 deletions tabs/applications-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ script = "setup-flatpak.sh"
name = "ZSH Prompt"
description = "The Z shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.\nThis command installs ZSH prompt and provides basic configuration."
script = "zsh-setup.sh"

[[data]]
name = "Install Linutil"
description = "Installs a distro-specific Linutil package locally."
script = "linutil-installer.sh"

[[data.preconditions]]
matches = false
data = "command_exists"
values = [ "linutil" ]

[[data]]
name = "Update Linutil"
description = "Updates your local Linutil installation."
script = "linutil-updater.sh"

[[data.preconditions]]
matches = true
data = "command_exists"
values = [ "linutil" ]

0 comments on commit f9c9313

Please sign in to comment.