mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-07 13:50:34 +00:00
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:
@@ -1,8 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Install ntfy
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
set -e
|
||||
|
||||
if ! command -v ntfy &> /dev/null; then
|
||||
have ntfy && {
|
||||
msg "ntfy already installed"
|
||||
} || {
|
||||
case $(dfm check arch) in
|
||||
Linux)
|
||||
NTFY_ARCH="linux_$(arch)"
|
||||
@@ -28,6 +34,4 @@ if ! command -v ntfy &> /dev/null; then
|
||||
fi
|
||||
|
||||
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
|
||||
else
|
||||
echo "ntfy already installed"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user