Created
May 3, 2021 00:09
-
-
Save mattbell87/b2b3427942b5fcde47c41f0aa4146738 to your computer and use it in GitHub Desktop.
Check if a cli app is installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| isInstalled() | |
| { | |
| command -v "$1" >/dev/null 2>&1 | |
| } | |
| if isInstalled $1; then | |
| echo "YES" | |
| else | |
| echo "NO" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment