AppImageKit-checkrt/AppRun

25 lines
541 B
Plaintext
Raw Normal View History

2022-06-23 15:36:53 +00:00
#!/bin/sh -e
# add your command to execute here
exec=
cd "$(dirname "$0")"
if [ "x$exec" = "x" ]; then
exec="$(sed -n 's|^Exec=||p' *.desktop | head -1)"
fi
if [ -x "./usr/optional/checkrt" ]; then
extra_libs="$(./usr/optional/checkrt)"
fi
if [ -n "$extra_libs" ]; then
export LD_LIBRARY_PATH="${extra_libs}${LD_LIBRARY_PATH}"
if [ -e "$PWD/usr/optional/exec.so" ]; then
export LD_PRELOAD="$PWD/usr/optional/exec.so:${LD_PRELOAD}"
fi
fi
#echo ">>>>> $LD_LIBRARY_PATH"
#echo ">>>>> $LD_PRELOAD"
./usr/bin/$exec "$*"
exit $?