#!/bin/bash

APPDIR="/usr"   # we installed uzdoom.bin in /usr/bin

# Always use bundled libs
export LD_LIBRARY_PATH="/usr/lib/uzdoom:$LD_LIBRARY_PATH"

# Optional informational message
if [ -f "/usr/lib/libopenal.so.1" ] || [ -f "/usr/lib64/libopenal.so.1" ] || [ -f "/lib/x86_64-linux-gnu/libopenal.so.1" ]
then
    echo "System OpenAL found"
else
    echo "System OpenAL NOT found"
fi

# Launch uzdoom binary
exec "/usr/bin/uzdoom.bin" "$@"

