summaryrefslogtreecommitdiff
path: root/nvidia/pre-install
blob: ffb2238302f500c224ee2d9b73047a7dd4e20c50 (plain)
    1 #!/bin/bash
    2 
    3 # check for root privileges needed for gl-select
    4 if [ ! $(id -u) -eq 0 ]; then
    5 	echo "root privileges needed to run this pre-install script!"
    6 	exit 1
    7 fi
    8 
    9 # is gl-select available?
   10 if [ -x /usr/bin/gl-select ]; then
   11 	printf '%b' "\033[33;1mNOTE: With the introduction of GLVND, gl-select is no
   12 longer needed. This pre-install script will reset gl-select
   13 to its default xorg setting if needed. It is recommended that
   14 gl-select be uninstalled after installing libglvnd and
   15 upgrading mesa3d.\033[0m\n"
   16 	# is nvidia currently selected?
   17 	if /usr/bin/gl-select status | grep -q 'nvidia.*is selected'; then
   18 		/usr/bin/gl-select use xorg
   19 	fi
   20 fi

Generated by cgit