head 1.3; access; symbols libdrm-1_0_4:1.3 experimental-0-1-branch:1.3.0.4 trunk-20021125:1.3 mesa-4-1-branch:1.3.0.2; locks; strict; comment @# @; 1.3 date 2002.08.05.18.08.38; author alanh; state Exp; branches; next 1.2; 1.2 date 2002.08.05.18.04.11; author alanh; state Exp; branches; next 1.1; 1.1 date 2002.05.22.15.40.55; author alanh; state Exp; branches; next ; desc @@ 1.3 log @actually check for the existence of extras/XFree86 and extras/agpgart before trying to execute the install sections. Fix indentation too. @ text @#!/bin/bash # script to copy new XFree86 binary if [ -e extras/XFree86 ]; then echo -n "Copy new XFree86 Xserver..." mv $1/bin/XFree86 $1/bin/XFree86.old cp -p extras/XFree86 $1/bin/XFree86 echo "done" fi # Possibly separate this out into agpgart-install.sh ??? # Just pull in the agpgart sources into extras/agpgart # when creating the script. if [ -e extras/agpgart ]; then LOGFILE="dri.log" LOGFILE_TMP="tmp.log" KERNEL_VER=`uname -r` KERNEL_LIB_DIR="/lib/modules/$KERNEL_VER" KERNEL_AGP_DIR="$KERNEL_LIB_DIR/kernel/drivers/char/agp" echo "" echo -n "Compiling agpgart.o..." cd extras/agpgart make agpgart.o >& ../../../$LOGFILE_TMP if [ $? != 0 ]; then cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE echo "" echo "" echo "ERROR: agpgart module did not compile" # Check to see if any older agpgart module already exists if [ -e $KERNEL_AGP_DIR/agpgart.o ]; then echo "" echo "WARNING: The existing agpgart kernel module available on your system might" echo "work; however, using an older module may severly limit functionality" echo "or performance!!! It is recommended that you upgrade to the latest" echo "agpgart kernel module." echo "" echo "Press ENTER to continue with the existing kernel module or CTRL-C to exit." read KEY USE_EXISTING_KERNEL_MODULE="1" else cd .. echo "" echo "The agpgart driver can not be installed." echo "Installation will be aborted. See the $LOGFILE file for information on" echo "what went wrong." echo "" exit 127; fi else echo "done"; fi echo "$LOGFILE_TMP $LOGFILE" cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE # Print X is running message ps -C X > /dev/null if [ $? == 0 ]; then X_RUNNING=1 print_logo echo "WARNING: YOUR X SERVER SEEMS TO BE RUNNING!" echo "" echo "The script can not update your agpgart module while the X server is running." echo "" echo "You can do one of the following:" echo "" echo "1. Log out of your X session now and then run this script." echo "" echo "2. Run the script now and restart your computer after the installation." echo " If you exit your X session now you will not have to restart." echo "" echo "Press ENTER to continue or CTRL-C to exit." read KEY ; else X_RUNNING=0; fi echo -n "Copying new agpgart.o..." cp -f agpgart.o $KERNEL_AGP_DIR/agpgart.o echo "done" if [ ! "$X_RUNNING" == "1" ]; then # Only try and update kernel modules if X server is not running echo -n "Removing old agpgart module \"$MOD\"..." /sbin/modprobe -r agpgart >& ../../../$LOGFILE_TMP if [ $? != 0 ]; then echo "ERROR" ERR=1; else echo "done"; fi cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE echo -n "Inserting new agpgart module..." /sbin/modprobe agpgart >& ../../../$LOGFILE_TMP if [ $? != 0 ]; then echo "ERROR" ERR=1; else echo "done"; fi cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE; fi if [ "$ERR" == "1" ]; then echo "" echo "There were errors updating the system configuration." echo "See the $LOGFILE file for more information."; fi cd ../.. fi # End of agpgart install @ 1.2 log @add support for building agpgart. Sources must go in extras/agpgart when creating new package. @ text @d5 6 a10 4 echo -n "Copy new XFree86 Xserver..." mv $1/bin/XFree86 $1/bin/XFree86.old cp -p extras/XFree86 $1/bin/XFree86 echo "done" d16 41 a56 10 LOGFILE="dri.log" LOGFILE_TMP="tmp.log" KERNEL_VER=`uname -r` KERNEL_LIB_DIR="/lib/modules/$KERNEL_VER" KERNEL_AGP_DIR="$KERNEL_LIB_DIR/kernel/drivers/char/agp" echo "" echo -n "Compiling agpgart.o..." cd extras/agpgart make agpgart.o >& ../../../$LOGFILE_TMP if [ $? != 0 ]; then a57 3 echo "" echo "" echo "ERROR: agpgart module did not compile" d59 6 a64 2 # Check to see if any older agpgart module already exists if [ -e $KERNEL_AGP_DIR/agpgart.o ]; then d66 14 a79 20 echo "WARNING: The existing agpgart kernel module available on your system might" echo "work; however, using an older module may severly limit functionality" echo "or performance!!! It is recommended that you upgrade to the latest" echo "agpgart kernel module." echo "" echo "Press ENTER to continue with the existing kernel module or CTRL-C to exit." read KEY USE_EXISTING_KERNEL_MODULE="1" else cd .. echo "" echo "The agpgart driver can not be installed." echo "Installation will be aborted. See the $LOGFILE file for information on" echo "what went wrong." echo "" exit 127; fi else echo "done"; fi d81 17 a97 2 echo "$LOGFILE_TMP $LOGFILE" cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE d99 4 a102 27 # Print X is running message ps -C X > /dev/null if [ $? == 0 ]; then X_RUNNING=1 print_logo echo "WARNING: YOUR X SERVER SEEMS TO BE RUNNING!" echo "" echo "The script can not update your agpgart module while the X server is running." echo "" echo "You can do one of the following:" echo "" echo "1. Log out of your X session now and then run this script." echo "" echo "2. Run the script now and restart your computer after the installation." echo " If you exit your X session now you will not have to restart." echo "" echo "Press ENTER to continue or CTRL-C to exit." read KEY ; else X_RUNNING=0; fi echo -n "Copying new agpgart.o..." cp -f agpgart.o $KERNEL_AGP_DIR/agpgart.o echo "done" if [ ! "$X_RUNNING" == "1" ]; then d104 6 a109 4 # Only try and update kernel modules if X server is not running echo -n "Removing old agpgart module \"$MOD\"..." /sbin/modprobe -r agpgart >& ../../../$LOGFILE_TMP d111 1 a111 5 if [ $? != 0 ]; then echo "ERROR" ERR=1; else echo "done"; a112 2 cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE d114 4 a117 8 echo -n "Inserting new agpgart module..." /sbin/modprobe agpgart >& ../../../$LOGFILE_TMP if [ $? != 0 ]; then echo "ERROR" ERR=1; else echo "done"; d120 2 a121 7 cat ../../../$LOGFILE_TMP >> ../../../$LOGFILE; fi if [ "$ERR" == "1" ]; then echo "" echo "There were errors updating the system configuration." echo "See the $LOGFILE file for more information."; d124 1 a124 1 cd ../.. @ 1.1 log @add extras script @ text @d5 1 d8 110 @