#!/bin/sh
# Launcher installed as /usr/bin/hook by the .deb. The application, its
# default data, the HTML documentation and the bundled libraries live under
# /opt/hook; exec the real binary there with the bundled library directory
# ahead of the system search path. Exporting APPIMAGE/APPDIR switches
# hook_paths into system-install mode: /opt/hook holds the read-only
# defaults, user data goes to the XDG dirs (~/.local/share/hook,
# ~/.config/hook), with the defaults copied there on first run.
exec env APPIMAGE=/usr/bin/hook APPDIR=/opt/hook \
    LD_LIBRARY_PATH="/opt/hook/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
    /opt/hook/hook "$@"
