fix: only run glxinfo if it is installed

This commit is contained in:
Martin Wimpress 2024-05-11 12:09:51 +01:00 committed by Martin Wimpress
parent eb6e9bf4df
commit ed1e85fb12
1 changed files with 9 additions and 5 deletions

View File

@ -1881,11 +1881,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
# Set the default 3D acceleration. # Set the default 3D acceleration.
if [ -z "${gl}" ]; then if [ -z "${gl}" ]; then
GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') if command -v glxinfo &>/dev/null; then
case ${GLSL_VER} in GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}')
1*|2*) gl="off";; case ${GLSL_VER} in
*) gl="on";; 1*|2*) gl="off";;
esac *) gl="on";;
esac
else
gl="on"
fi
fi fi
if [ -z "${PUBLIC}" ]; then if [ -z "${PUBLIC}" ]; then