diff --git a/.local/bin/Update-pkg b/.local/bin/Update-pkg index ed35759..db8e8f1 100755 --- a/.local/bin/Update-pkg +++ b/.local/bin/Update-pkg @@ -6,6 +6,8 @@ ZSHFOLDER=$HOME/.config/zsh CONFIG="$HOME/.config" OHMYZSH="$HOME/.oh-my-zsh" +mkdir -p $ZSHFOLDER $CONFIG $OHMYZSH + # Colours RED='\033[0;31m' GREEN='\033[0;0;32m' @@ -68,11 +70,13 @@ function command_start() { } function command_exists() { - if which "$1" > /dev/null 2>&1; then + if command -v "$1" > /dev/null 2>&1; then timestamp "Command $1 has been found" else err "Command $1 has been NOT found" - exit 0 + + # Return false + return 1 fi }