mac-launcher.sh 548 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # hoardom app launcher - opens Terminal with TUI
  3. SELF_DIR="$(cd "$(dirname "$0")" && pwd)"
  4. HOARDOM="/usr/local/bin/hoardom"
  5. # try installed binary first, fall back to bundled copy
  6. if [ ! -x "$HOARDOM" ]; then
  7. HOARDOM="$SELF_DIR/hoardom-bin"
  8. fi
  9. if [ -x "$HOARDOM" ]; then
  10. osascript \
  11. -e 'tell application "Terminal"' \
  12. -e ' activate' \
  13. -e " do script \"'$HOARDOM' --tui\"" \
  14. -e 'end tell'
  15. else
  16. osascript -e 'display dialog "hoardom binary not found" buttons {"OK"} default button "OK"'
  17. fi