Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536#!/bin/bash# ac-dmx-cli — node-resolving wrapper around ac-dmx-cli.mjs.## Same shape as the other slab bins: symlinked into ~/.local/bin, resolves# through the link back to the .mjs next to it, and finds a usable `node`# even under launchd's minimal PATH (no fnm shim there).set -uSRC="${BASH_SOURCE[0]}"while [ -L "$SRC" ]; do DIR="$(cd -P "$(dirname "$SRC")" && pwd)" SRC="$(readlink "$SRC")" [[ "$SRC" != /* ]] && SRC="$DIR/$SRC"doneHERE="$(cd -P "$(dirname "$SRC")" && pwd)"SCRIPT="$HERE/ac-dmx-cli.mjs"find_node() { if command -v node >/dev/null 2>&1; then command -v node; return; fi local c for c in \ "$HOME/.local/share/fnm/aliases/default/bin/node" \ "$HOME/.fnm/aliases/default/bin/node" \ /opt/homebrew/bin/node \ /usr/local/bin/node \ "$HOME/.volta/bin/node"; do [ -x "$c" ] && { echo "$c"; return; } done c=$(ls -td "$HOME"/.local/share/fnm/node-versions/*/installation/bin/node \ 2>/dev/null | head -1) [ -n "$c" ] && [ -x "$c" ] && { echo "$c"; return; } return 1}NODE="$(find_node)" || { echo "ac-dmx-cli: no node found" >&2; exit 1; }exec "$NODE" "$SCRIPT" "$@"