#!/bin/sh
# Jonquil.app's launcher: load the bundled libraries, then run Jonquil.
here="$(cd "$(dirname "$0")" && pwd)"
export DYLD_LIBRARY_PATH="$here/../Frameworks${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
# Jonquil drops DYLD_LIBRARY_PATH again once it's loaded, so git, node
# or jank it starts load their own libraries (jonquil.bundle-env)
export JONQUIL_BUNDLE_FRAMEWORKS="$here/../Frameworks"
# GTK's GSettings schemas (a file dialog reads them), compiled into the
# bundle; searched before the system's, which it doesn't replace
export GSETTINGS_SCHEMA_DIR="$here/../Resources/share/glib-2.0/schemas${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR}"
exec "$here/jonquil-bin" "$@"
