aboutsummaryrefslogtreecommitdiff
path: root/dist/mac-launcher.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dist/mac-launcher.sh')
-rw-r--r--dist/mac-launcher.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/dist/mac-launcher.sh b/dist/mac-launcher.sh
new file mode 100644
index 0000000..c384cae
--- /dev/null
+++ b/dist/mac-launcher.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# hoardom app launcher - opens Terminal with TUI
+SELF_DIR="$(cd "$(dirname "$0")" && pwd)"
+HOARDOM="/usr/local/bin/hoardom"
+
+# try installed binary first, fall back to bundled copy
+if [ ! -x "$HOARDOM" ]; then
+ HOARDOM="$SELF_DIR/hoardom-bin"
+fi
+
+if [ -x "$HOARDOM" ]; then
+ osascript \
+ -e 'tell application "Terminal"' \
+ -e ' activate' \
+ -e " do script \"'$HOARDOM' --tui\"" \
+ -e 'end tell'
+else
+ osascript -e 'display dialog "hoardom binary not found" buttons {"OK"} default button "OK"'
+fi