#!/bin/bash
# Copyright 2007-2025 Mitchell. See LICENSE.

# Set environment variables of resources within Textadept.app.
bundle=$(cd "$(dirname "$0")/../../" && pwd)
export DYLD_FRAMEWORK_PATH="$bundle/Contents/Frameworks"

# Strip out the argument added by macOS.
if [ x`echo "x$1" | sed "s/^x-psn_.*//"` == x ]; then shift 1; fi

# Run Textadept.
exec "$bundle/Contents/MacOS/textadept" "$@"
