Add function command_exists

This commit is contained in:
Felipe Conti 2018-06-10 14:04:34 -03:00
parent aa6c00b083
commit c786b697bf
1 changed files with 4 additions and 0 deletions

View File

@ -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