2 # Written by Jonathan Schmidt <j.schmidt@archlinux.us>
4 # glselect - switch between mesa and nvidia gl libraries
9 if [ -e /usr
/lib
/libGLcore.so
.1 ]
11 for i
in `ls -l /usr/lib/libGLcore.so.1`
13 nvver
=${i//libGLcore.so.}
15 elif [[ "$newlib" = "nvidia" ]]
17 echo "You do not have nvidia*-utils installed."
21 if [[ "$newlib" = "mesa" ]]
23 ln -sf libGL.so
.1.2 /usr
/lib
/libGL.so
24 ln -sf libGL.so
.1.2 /usr
/lib
/libGL.so
.1
25 ln -sf libglx.xorg
/usr
/lib
/xorg
/modules
/extensions
/libglx.so
26 elif [[ "$newlib" = "nvidia" ]]
28 ln -sf libGL.so.
${nvver} /usr
/lib
/libGL.so
29 ln -sf libGL.so.
${nvver} /usr
/lib
/libGL.so
.1
30 ln -sf libglx.so.
${nvver} /usr
/lib
/xorg
/modules
/extensions
/libglx.so
31 elif [[ "$newlib" = "show" ]]
33 if [[ `readlink /usr/lib/libGL.so` = "libGL.so.1.2" ]]
36 elif [[ `readlink /usr/lib/libGL.so` = "libGL.so.${nvver}" ]]
40 echo "You have not setup symlinks yet."
44 echo "Usage: glselect [ mesa | nvidia | show ]"