Added function command_exists into a Update-pkg

This commit is contained in:
Marcin Woźniak 2024-04-13 22:19:47 +02:00
parent bb21b5cb22
commit ed18ee8dac

View File

@ -51,6 +51,15 @@ function command_start() {
timestamp "Command $* has been ended."
}
function command_exists() {
if which "$1" > /dev/null 2>&1; then
timestamp "Command $1 has been found"
else
err "Command $1 has been NOT found"
exit 0
fi
}
function update_pip() {
# Update the pip
if [[ "$(uname)" == "Darwin" ]]; then