Add function to check for installed program

Notifies if program is missing.
This commit is contained in:
Marty Oehme 2019-12-04 16:57:15 +01:00
parent eb88925501
commit d4ae593f50
2 changed files with 14 additions and 3 deletions

4
.local/bin/ifinstalled Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
# If $1 command is not available, error code and notify.
command -v "$1" >/dev/null || { notify-send "📦 $1" "must be installed for this function." && exit 1 ;}