#!/bin/bash
temp_gdk_loaders_cache="$(mktemp)"
function atexit {
  [ -n "$temp_gdk_loaders_cache" ] && rm -f "$temp_gdk_loaders_cache"
}
trap atexit EXIT

appdir_lib_escaped="$(printf '%s\n' "$APPDIR/usr/lib" | sed -e 's/[\/&]/\\&/g')"
sed "s,%RETARGET%,$appdir_lib_escaped," \
    "$APPDIR/usr/lib/loaders.cache" > "$temp_gdk_loaders_cache"
export GDK_PIXBUF_MODULE_FILE="$temp_gdk_loaders_cache"

"$APPDIR/usr/bin/oneshot"
