fixed commandExists
This commit is contained in:
@@ -41,7 +41,7 @@ alias start_x11_vnc="x11vnc -many -display :0 -no6 -rfbport 5900 -auth /var/run/
|
|||||||
|
|
||||||
|
|
||||||
commandExists() {
|
commandExists() {
|
||||||
type $1 2 >& 1 > /dev/null
|
type $1 2>&1 > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ doUpdateSystem() {
|
|||||||
|
|
||||||
|
|
||||||
updateFlatpak() {
|
updateFlatpak() {
|
||||||
if [[ ! $(commandExists flatpak) ]]; then
|
if ! $(commandExists flatpak); then
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
noconfirm=
|
noconfirm=
|
||||||
@@ -127,7 +127,7 @@ finds () {
|
|||||||
|
|
||||||
# sends a desktop-notification with an icon signalling an error
|
# sends a desktop-notification with an icon signalling an error
|
||||||
notifyError () {
|
notifyError () {
|
||||||
if [[ ! $(commandExists notify-send) ]]; then
|
if ! $(commandExists notify-send); then
|
||||||
echo "ERROR: $1";
|
echo "ERROR: $1";
|
||||||
else
|
else
|
||||||
notify-send "$1" --icon=data-warning;
|
notify-send "$1" --icon=data-warning;
|
||||||
@@ -137,7 +137,7 @@ notifyError () {
|
|||||||
|
|
||||||
# sends a desktop-notification with an icon signalling a simple information
|
# sends a desktop-notification with an icon signalling a simple information
|
||||||
notifyInfo () {
|
notifyInfo () {
|
||||||
if [[ ! $(commandExists notify-send) ]]; then
|
if ! $(commandExists notify-send); then
|
||||||
echo "INFO: $1";
|
echo "INFO: $1";
|
||||||
else
|
else
|
||||||
notify-send "$1" --icon=preferences-desktop-notification;
|
notify-send "$1" --icon=preferences-desktop-notification;
|
||||||
|
|||||||
Reference in New Issue
Block a user