From c786b697bf71066b54fa58c1626317ff18515ff0 Mon Sep 17 00:00:00 2001 From: Felipe Conti Date: Sun, 10 Jun 2018 14:04:34 -0300 Subject: [PATCH] Add function command_exists --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index a377972..31e83aa 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,10 @@ KERNEL=$(uname -s) function output() { echo -e "\033[32mctop-install\033[0m $@"; } +function command_exists() { + command -v "$@" > /dev/null 2>&1 +} + # extract github download url matching pattern function extract_url() { match=$1; shift