#!/bin/bash
# mox - Terminal Music CLI wrapper script
# This script provides a convenient way to run mox from the root directory

# Handle symlinks properly - resolve to actual script location
SOURCE="$0"
while [ -L "$SOURCE" ]; do
  DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"

# Set environment variable so mox.sh knows where the package is installed
export MOX_PACKAGE_DIR="$SCRIPT_DIR"

exec "$SCRIPT_DIR/src/mox.sh" "$@"