shell: have, path_(append|prepend|remove)

- have: command -v shorthand
- path_append: appends dir to PATH
- path_prepend: prepends dir to PATH
- path_remove: removes dir from PATH
This commit is contained in:
2023-04-14 00:42:08 +03:00
parent 4492c386b6
commit e5d6cb37fd
15 changed files with 124 additions and 111 deletions

View File

@@ -4,9 +4,7 @@
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
if ! command -v go &> /dev/null; then
msg "go hasn't been installed yet."
else
have go && {
packages=(
# sysadmin/scripting utilities, distributed as a single binary
github.com/skx/sysbox@latest
@@ -28,5 +26,4 @@ else
done
msg_ok "Done"
fi
} || msg "go hasn't been installed yet."