#!/usr/bin/env bash
# AC Compiler wrapper script for global npm installation (Linux/macOS)

# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# The ac binary is in the parent directory (npm flattens the structure)
# npm installs to ~/.npm-global/lib/node_modules/aclang/
# The ac binary is at ~/.npm-global/lib/node_modules/aclang/ac-compiler/ac
AC_COMPILER_DIR="$(cd "$SCRIPT_DIR/../lib/node_modules/aclang" && pwd)"

# Run the AC compiler
"$AC_COMPILER_DIR/ac-compiler/ac" "$@"
