Fix: Changes to have command usage

This commit is contained in:
2023-05-05 22:59:14 +03:00
parent edd56c80eb
commit e5fe49834d
6 changed files with 24 additions and 8 deletions

View File

@@ -39,4 +39,7 @@ have gh && {
done
msg_ok "Done"
} || msg_err "gh (GitHub Client) could not be found, please install it first"
}
! have gh \
&& msg_err "gh (GitHub Client) could not be found, please install it first"

View File

@@ -34,4 +34,6 @@ have go && {
done
msg_ok "Done"
} || msg "go hasn't been installed yet."
}
! have go && msg "go hasn't been installed yet."

View File

@@ -36,4 +36,6 @@ have npm && {
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
} || msg_err "npm could not be found."
}
! have npm && msg_err "npm could not be found."

View File

@@ -6,9 +6,9 @@
source "$HOME/.dotfiles/scripts/shared.sh"
set -e
have ntfy && {
msg "ntfy already installed"
} || {
have ntfy && msg "ntfy already installed"
! have ntfy && {
case $(dfm check arch) in
Linux)
NTFY_ARCH="linux_$(arch)"

View File

@@ -4,6 +4,12 @@
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
#
[ "$(uname)" != "Darwin" ] && echo "Not a macOS system" && exit 0
! have xcode-select \
&& msg_err "xcode-select could not be found, skipping" \
&& exit 0
# Ask for the administrator password upfront
sudo -v