fixed some things

This commit is contained in:
pika 2025-05-18 11:59:19 +02:00
parent 4127204f34
commit 1028b75cab

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
PACKAGE=hyprland
# ╭───────────────╮ # ╭───────────────╮
# │ env functions │ # │ env functions │
# ╰───────────────╯ # ╰───────────────╯
@ -9,6 +11,12 @@ 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
@ -53,6 +61,9 @@ checkEnv() {
elif $arch; then elif $arch; then
echo_info "Using arch linux.. You really shouldn't get any errors :)" echo_info "Using arch linux.. You really shouldn't get any errors :)"
return 0 return 0
else
echo_error "Cannot install $PACKAGE for $distro"
return 69
fi fi
} }
@ -145,10 +156,7 @@ instCustom() {
eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/hyprshot.sh)" eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/hyprshot.sh)"
;; ;;
gBar) gBar)
case $distro in eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/gbar.sh)"
arch) run _install gbar-git ;;
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
esac
;; ;;
rofi) rofi)
eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/rofi.sh)" eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/rofi.sh)"