#! /usr/bin/env bash

# autogenerated by linuxdeploy

# make sure errors in sourced scripts will cause this script to stop
set -e

this_dir="$(readlink -f "$(dirname "$0")")"

SIGIL_EXTRA_ROOT="$this_dir/usr/share/sigil"
export SIGIL_EXTRA_ROOT
echo "${SIGIL_EXTRA_ROOT}"

LD_LIBRARY_PATH="$this_dir/usr/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH

export SIGIL_APPIMAGE_LIB_DIR="$this_dir/usr/lib"
export SIGIL_EXEC_WRAPPER="$this_dir/usr/optional/exec_wrapper.so"

source "$this_dir"/apprun-hooks/"linuxdeploy-plugin-qt-hook.sh"

LD_PRELOAD="$this_dir"/usr/optional/exec_wrapper.so exec "$this_dir"/AppRun.wrapped "$@"
