#!/bin/csh # # Setup program for the ikon driver # # Determine the install path for the install file set progname = $0 set instpath = $progname:h if ("$progname" == "$instpath") set instpath = "." # # Assure the existance of the intstall file echo "Installing from directory $instpath" set driver_file = $instpath/ikondrv.tz if (! -f $driver_file) then echo "Error: Driver install file $driver_file does not exist. Cannot install." exit 2 endif # # Copy the file to a directory path "/usr/ikon", uncompressing/untarring it. mkdir -p /usr/ikon if ($status != 0) then echo "Cannot create directory '/usr/ikon'. Check to insure you have " echo "creation rights for this directory, or run the setup as root." exit 3 endif cp $driver_file /usr/ikon/ikondrv.tar.Z if ($status != 0) then echo "Cannot copy driver install file $driver_file to /usr/ikon." echo "Check to insure you have write rights for this directory, or" echo "run the setup as root." exit 4 endif cd /usr/ikon uncompress ikondrv.tar.Z if ($status != 0) then echo "Cannot uncompress driver install file /usr/ikon/ikondrv.tar.Z." echo "Check to insure you have write rights for this directory, and" echo "that the datafile is not corrupt." exit 5 endif tar xf ikondrv.tar && rm ikondrv.tar if ($status != 0) then echo "Cannot extract driver material from driver install file" echo "/usr/ikon/ikondrv.tar. Check to insure you have write rights " echo "for this directory, and that the datafile is not corrupt." exit 6 endif if (! -f install_ikon) then echo "Driver install script /usr/ikon/install_ikon could not be found." exit 5 endif if (! -x install_ikon) then chmod +x install_ikon endif ./install_ikon