diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-24 12:05:10 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-24 12:05:10 +0900 |
| commit | b15c6b710f19b74398acd738efb6281183c88b8d (patch) | |
| tree | 5f23c44e6f06a4b943f4db9d4b9ab69b07bc5446 /mac/.local/bin/ifinstalled | |
| parent | 818ff6ad1be60d8d0d9de039306d1fc5c7189081 (diff) | |
updates
Diffstat (limited to 'mac/.local/bin/ifinstalled')
| -rwxr-xr-x | mac/.local/bin/ifinstalled | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mac/.local/bin/ifinstalled b/mac/.local/bin/ifinstalled index d0bd26b..b48dd63 100755 --- a/mac/.local/bin/ifinstalled +++ b/mac/.local/bin/ifinstalled @@ -6,7 +6,10 @@ # various other scripts for clarity's sake. for x in "$@"; do - if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then - notify-send "📦 $x" "must be installed for this function." && exit 1 + if ! command -v "$x" >/dev/null 2>&1 && + ! brew list --formula "$x" >/dev/null 2>&1 && + ! brew list --cask "$x" >/dev/null 2>&1; then + osascript -e 'display notification "'"$x"' must be installed for this function." with title "📦 Dependency missing"' + exit 1 fi done |
