Update-pkg: added new version of script

This commit is contained in:
Marcin Woźniak 2024-10-06 01:48:22 +02:00
parent d84b26ed43
commit fd6d038df7
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -6,6 +6,8 @@ ZSHFOLDER=$HOME/.config/zsh
CONFIG="$HOME/.config" CONFIG="$HOME/.config"
OHMYZSH="$HOME/.oh-my-zsh" OHMYZSH="$HOME/.oh-my-zsh"
mkdir -p $ZSHFOLDER $CONFIG $OHMYZSH
# Colours # Colours
RED='\033[0;31m' RED='\033[0;31m'
GREEN='\033[0;0;32m' GREEN='\033[0;0;32m'
@ -68,11 +70,13 @@ function command_start() {
} }
function command_exists() { 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" timestamp "Command $1 has been found"
else else
err "Command $1 has been NOT found" err "Command $1 has been NOT found"
exit 0
# Return false
return 1
fi fi
} }