This commit is contained in:
pika 2025-05-18 18:49:03 +02:00
parent fc99969966
commit e744c698da

View file

@ -112,21 +112,21 @@ checkAndInstall() {
# ─< if it's not a list, then just check and install the package.. >──────────────────────
if [ -z "$2" ]; then
if ! command_exists "$1"; then
echo_note "$1 is not installed. Installing it now.."
echo_pkg "$1 is not installed. Installing it now.."
run _install "$1"
else
echo_note "skipping $1 - as it's already installed.."
echo_pkg "skipping $1 - as it's already installed.."
fi
else
# ─< else go though the list of items and do the same >───────────────────────────────────
echo "${YELLOW}Installing package group - ${RED} $@ ${NC}"
echo "${BRIGHT_YELLOW}Installing package group -${BOLD}${RED} $@ ${NC}"
for deps in "${@}"; do
echo_info "Installing $deps"
echo_pkg "Installing $deps"
if ! command_exists $deps; then
echo_note "$deps is not installed. Installing it now.."
echo_pkg "$deps is not installed. Installing it now.."
run _install "$deps"
else
echo_note "skipping $deps - as it's already installed.."
echo_pkg "skipping $deps - as it's already installed.."
fi
done
fi
@ -164,13 +164,13 @@ _setup() {
arch)
_install() {
if command_exists paru; then
echo_info "Using paru"
echo_pkg "Using paru"
paru -S --color always --noconfirm --needed "$@"
elif command_exists yay; then
echo_info "Using yay"
echo_pkg "Using yay"
yay -S --color always --noconfirm --needed "$@"
else
echo_warning "Using pacman"
echo_pkg "Using pacman"
$_sudo pacman -S --color always --noconfirm --needed "$@"
fi
}