From ba44f7d655e1f372e0606ace9c61291bf2693b46 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 18 May 2025 12:38:56 +0200 Subject: [PATCH] wip --- yazi.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/yazi.sh b/yazi.sh index 38a793c..32aee74 100644 --- a/yazi.sh +++ b/yazi.sh @@ -1,11 +1,19 @@ { #!/usr/bin/env bash + PACKAGE=yazi + # ─< Check if the given command exists silently >───────────────────────────────────────── command_exists() { 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: # This import will give you the following variables: # _sudo="sudo -E" <- only if non root user