This commit is contained in:
pika 2025-05-16 10:33:58 +02:00
parent 00ac710e50
commit 0269c60f83

View file

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