From 73f5fe2e45c4104b4b8180764f4d4d82ee8ee8c4 Mon Sep 17 00:00:00 2001 From: fabian Date: Thu, 20 Nov 2025 21:28:53 +0100 Subject: [PATCH] fixed commandExists --- home_external/.bash_aliases | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home_external/.bash_aliases b/home_external/.bash_aliases index 049b310..b4253dd 100644 --- a/home_external/.bash_aliases +++ b/home_external/.bash_aliases @@ -41,7 +41,7 @@ alias start_x11_vnc="x11vnc -many -display :0 -no6 -rfbport 5900 -auth /var/run/ commandExists() { - type $1 2 >& 1 > /dev/null + type $1 2>&1 > /dev/null } @@ -68,7 +68,7 @@ doUpdateSystem() { updateFlatpak() { - if [[ ! $(commandExists flatpak) ]]; then + if ! $(commandExists flatpak); then return 1; fi noconfirm= @@ -127,7 +127,7 @@ finds () { # sends a desktop-notification with an icon signalling an error notifyError () { - if [[ ! $(commandExists notify-send) ]]; then + if ! $(commandExists notify-send); then echo "ERROR: $1"; else notify-send "$1" --icon=data-warning; @@ -137,7 +137,7 @@ notifyError () { # sends a desktop-notification with an icon signalling a simple information notifyInfo () { - if [[ ! $(commandExists notify-send) ]]; then + if ! $(commandExists notify-send); then echo "INFO: $1"; else notify-send "$1" --icon=preferences-desktop-notification;