diff --git a/hypr/hyprgraphics.sh b/hypr/hyprgraphics.sh index eb98438..9a380b3 100644 --- a/hypr/hyprgraphics.sh +++ b/hypr/hyprgraphics.sh @@ -1,20 +1,10 @@ #!/usr/bin/env bash -unset PACKAGE && - PACKAGE=hyprgraphics - # ─< 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_note "$(which $PACKAGE)" - echo_warning "Exiting now!" - exit 69 -fi - # WHY: # This import will give you the following variables: # _sudo="sudo -E" <- only if non root user @@ -42,6 +32,19 @@ getImports() { source "$import" sleep 0.2 rm "$import" + + unset PACKAGE + + PACKAGE=hyprgraphics && + echo_note "Installing $PACKAGE.." + + sleep 1 + + if command_exists $PACKAGE; then + echo_warning "$PACKAGE is alread installed!" + echo_warning "Exiting now!" + exit 69 + fi } checkComp() { diff --git a/hypr/hyprutils.sh b/hypr/hyprutils.sh index f92dd76..2044190 100644 --- a/hypr/hyprutils.sh +++ b/hypr/hyprutils.sh @@ -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() {