#!/bin/csh -f # # Octtools pre-installation uncompress-untar script. # ############################################################################### # # # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 # # The Regents of the University of California. All rights reserved. # # # # Permission to use, copy, modify, and distribute this software and its # # documentation for any purpose, without fee, and without written agreement # # is hereby granted, provided that the above copyright notice and the # # following two paragraphs appear in all copies of this software. # # # # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR # # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT # # OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY # # OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY # # AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS # # ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO # # PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # # # ############################################################################### echo "PREINSTALL: Octtools 5.2 installation setup script." if ( $#argv != 1 ) then echo "usage: PREINSTALL [keep|remove]" echo " keep - keep compressed archives" echo " remove - remove compressed archives after use" echo " (useful if space is tight)" exit 1 endif if ( $1 == "keep" ) then set spaceIsTight = 0 else if ( $1 == "remove" ) then set spaceIsTight = 1 else echo "usage: PREINSTALL [keep|remove]" echo " keep - keep compressed archives" echo " remove - remove compressed archives after use" exit 1 endif if ( -e OCT5.2.base.tar.gz && ! -e checksum.tmp && `ARCHITECTURE` != hpux ) then echo " Verifying checksums ..." sum *5.2*.gz > checksum.tmp # HP checksums are unavailable # if ( `ARCHITECTURE` == hpux ) then # set checkname = CHECKSUMS.hp # else set checkname = CHECKSUMS # endif diff checksum.tmp $checkname if ( $status ) then echo " Warning: checksum error." echo " Your version of the distribution may be corrupted." else echo " ... checksums are OK." endif endif echo echo " Unfolding Octtools 5.2..." foreach part ( OCT5.2*.gz ) echo "--- Unfolding $part ..." gzcat $part | tar xf - # if ( ! $status ) then # echo # echo "----- ** Unfolding of $part may have failed. **" # echo # endif if ( $status && $spaceIsTight ) then echo $B "----- Removing $part ..." \rm $part endif echo "----- $part done." end mkdir archive mv sis* archive mv spice* archive echo echo echo "--- If you want the optional parts of the release," foreach i ( OPT* ) echo "--- $i" end echo "--- you can unfold them by hand with: gzcat [optional part] | tar xf -" echo echo "Note that non Oct-based tools are available in the archive directory." echo echo "PREINSTALL is done; now you can run INSTALL." echo echo " Remember to set the environment variable OCTTOOLS in your .cshrc file" echo " with a line of the form:" echo " setenv OCTTOOLS $cwd/`ARCHITECTURE`" echo