This commit is contained in:
pika 2025-05-16 10:38:34 +02:00
parent c39279553c
commit c594535bf5
2 changed files with 26 additions and 19 deletions

View file

@ -1,19 +1,10 @@
#!/usr/bin/env bash
unset PACAKGE &&
PACKAGE=hyprutils
# ─< Check if the given command exists silently >─────────────────────────────────────────
command_exists() {
command -v "$@" >/dev/null 2>&1
}
if command_exists $PACKAGE; then
echo_warning "$PACKAGE is alread installed!"
echo_warning "Exiting now!"
exit 69
fi
# WHY:
# This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user
@ -41,6 +32,19 @@ getImports() {
source "$import"
sleep 0.2
rm "$import"
unset PACKAGE
PACKAGE=hyprutils &&
echo_note "Installing $PACKAGE.."
sleep 1
if command_exists $PACKAGE; then
echo_warning "$PACKAGE is alread installed!"
echo_warning "Exiting now!"
exit 69
fi
}
getDependencies() {