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 f3ec2e8859
commit 7e06c4c886
Signed by: y0rune
GPG Key ID: F204C385F57EB348

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