aboutsummaryrefslogtreecommitdiff
path: root/system/nvidia-driver/nvidia-switch
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2011-01-09 12:44:22 -0500
committerRobby Workman <rworkman@slackbuilds.org>2011-01-10 15:04:45 -0600
commita7d9001ae24cc00dafbad5b7b0950eb321df0b21 (patch)
tree53f4bb8f0209cd6b047cbe61897f8a8639f2d8b4 /system/nvidia-driver/nvidia-switch
parenta6112d0b9bb2d36ff0ccec728705d2b5153f34ea (diff)
system/nvidia-driver: Updated for version 260.19.29.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/nvidia-driver/nvidia-switch')
-rw-r--r--system/nvidia-driver/nvidia-switch70
1 files changed, 16 insertions, 54 deletions
diff --git a/system/nvidia-driver/nvidia-switch b/system/nvidia-driver/nvidia-switch
index 41c9c23857243..e88534c40a355 100644
--- a/system/nvidia-driver/nvidia-switch
+++ b/system/nvidia-driver/nvidia-switch
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2007-2009 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,7 +20,7 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# nvidia-switch utility 0.9.0
+# nvidia-switch utility 0.9.1
#
# A tool to switch between nvidia-binary-driver and stock xorg-driver
# if both are installed in parallel.
@@ -70,27 +70,18 @@ setup_link(){
incs(){
cd "$INC"
-if [ "$2" = "cleanup" ]; then
- CMD="mv"
- THREE="$1"
-else
- CMD="ln -s"
- THREE="$2"
-fi
-
for i in glxext.h glext.h glx.h gl.h; do
if [ -L "$i" ]; then
rm -f "$i"
- $CMD "$i-$THREE" "$i"
+ mv "$i-xorg" "$i"
elif [ -e "$i" ]; then
- if [ "$2" = "cleanup" ]; then
- rm -f "$i-$1"
- else
- mv "$i" "$i-$1"
- ln -s "$i-$THREE" "$i"
+ if [ -e "$i-xorg" ]; then
+ rm -f "$i-xorg"
fi
else
- $CMD "$i-$THREE" "$i"
+ if [ -e "$i-xorg" ]; then
+ mv "$i-xorg" "$i"
+ fi
fi
done
@@ -259,23 +250,6 @@ check(){
fi
}
-check_includes(){
- if [ "$1" = "cleanup" ]; then
- cleanup=""
- cleanup2="exist"
- else
- cleanup="link"
- cleanup2=""
- fi
-
- for i in glext.h glxext.h gl.h glx.h; do
- check $INC $i $cleanup
- check $INC $i-nvidia
- check $INC $i-xorg $cleanup2
- echo ""
- done
-}
-
check_glx(){
if [ "$1" = "xorg" ]; then
xorg="exist"
@@ -350,8 +324,6 @@ check_gl(){
}
nvidia_check(){
- check_includes
-
check_gl "nvidia"
check_glx
@@ -360,8 +332,6 @@ nvidia_check(){
}
xorg_check(){
- check_includes
-
check_gl
check_glx "xorg"
@@ -370,8 +340,6 @@ xorg_check(){
}
cleanup_check(){
- check_includes "cleanup"
-
check_gl
check_glx "cleanup"
@@ -384,7 +352,7 @@ nvidia(){
echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf."
echo "Otherwise, this may lead to improperly working drivers."
- incs "xorg" "nvidia"
+ incs
lib_nvidia
libgl_nvidia
libs "nvidia"
@@ -402,23 +370,17 @@ xorg(){
echo "Make sure the nvidia driver is DISABLED in /etc/X11/xorg.conf."
echo "Otherwise, this may lead to improperly working drivers."
+ libs_basic
+ libgl_xorg
+ libs ""
if [ "$1" = "cleanup" ]; then
- incs "xorg" "cleanup"
+ libglx_xorg ""
else
- incs "xorg" "xorg"
+ libglx_xorg "xorg"
fi
- libs_basic
- libgl_xorg
- libs ""
- if [ "$1" = "cleanup" ]; then
- libglx_xorg ""
- else
- libglx_xorg "xorg"
- fi
-
- LD_NVIDIA="${LIB}/libGL.so.1.2"
- nvidia_ldconfig $LD_NVIDIA "xorg"
+ LD_NVIDIA="${LIB}/libGL.so.1.2"
+ nvidia_ldconfig $LD_NVIDIA "xorg"
}
usage(){