summaryrefslogtreecommitdiff
path: root/mac/.local/bin/ifinstalled
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 13:36:06 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 13:36:06 +0900
commit6baef1437fcf40b1d51c5255af78ab297d361d2c (patch)
treec3c257e026ec3fb32b787839f81d8af0c2e6c7ce /mac/.local/bin/ifinstalled
parent07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (diff)
updates
Diffstat (limited to 'mac/.local/bin/ifinstalled')
-rwxr-xr-xmac/.local/bin/ifinstalled12
1 files changed, 12 insertions, 0 deletions
diff --git a/mac/.local/bin/ifinstalled b/mac/.local/bin/ifinstalled
new file mode 100755
index 0000000..d0bd26b
--- /dev/null
+++ b/mac/.local/bin/ifinstalled
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Some optional functions in THESIAH require programs not installed by default. I
+# use this little script to check to see if a command exists and if it doesn't
+# it informs the user that they need that command to continue. This is used in
+# 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
+ fi
+done