This commit is contained in:
pika 2025-05-18 12:38:56 +02:00
parent 0d4c6cfc7a
commit ba44f7d655

View file

@ -1,11 +1,19 @@
{ {
#!/usr/bin/env bash #!/usr/bin/env bash
PACKAGE=yazi
# ─< 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_error "$PACKAGE is already installed!"
echo_error "Exiting now!"
return 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