mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-12 23:13:48 -05:00
rename binaryExists to commandExists
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Functions for validating common use-cases
|
||||
|
||||
_binaryExists_() {
|
||||
_commandExists_() {
|
||||
# DESC:
|
||||
# Check if a binary exists in the search PATH
|
||||
# ARGS:
|
||||
@@ -9,7 +9,7 @@ _binaryExists_() {
|
||||
# 0 if true
|
||||
# 1 if false
|
||||
# USAGE:
|
||||
# (_binaryExists_ ffmpeg ) && [SUCCESS] || [FAILURE]
|
||||
# (_commandExists_ ffmpeg ) && [SUCCESS] || [FAILURE]
|
||||
[[ $# == 0 ]] && fatal "Missing required argument to ${FUNCNAME[0]}"
|
||||
|
||||
if ! command -v "$1" >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user