File:  [TIS-4000 Rel T60] / scripts / CheckSum
Revision 1.2: download - view: text, annotated - select for diffs
Tue Jun 27 18:53:52 2000 UTC (17 years, 5 months ago) by tis4000
Branches: MAIN
CVS tags: LMC_baseline, HEAD, Duluth_baseline
Changed results to be placed into distribution directory. - NDalesio

#!/bin/sh
#
begin="x"
installdir="x"
rel="x"
relDisk="x"
targetIOC="x"
tortype="x"
#
#  This script will check the sums of files in the bin directories.
#  The output is place in the $relDisk checksum directory.
#
echo
echo "Please enter release disk mount point with the leading slash /"
read relDisk
echo "Using $relDisk"

echo
echo "Please enter the distribution directory: "
read installdir
echo "Installing $installdir"

echo
echo "Is this release t55 or t60? "
read rel
echo "Using $rel"

until [ "$tortype" = Tornado ] || [ "$tortype" = Tornado2 ] || [ "$tortype" = both ]
do
  echo
  echo "Does this use (Tornado or Tornado2 or both)? "
  read tortype
  echo "Using $tortype"
done

until [ "$targetIOC" = X486 ] || [ "$targetIOC" = M30 ]
do
  echo
  echo "Which IOC type is this (X486 or M30)? "
  read targetIOC
  echo "Using $targetIOC"
done

echo
echo "Please enter the release tag or today's date"
read tag

until [ "$begin" = n ] || [ "$begin" = y ]
do
  echo
  echo "This script will calculate checksums of the binary files."
  echo "The output will be placed in $relDisk/$installdir/checksum/SUM$tag file and"
  echo "a copy will be mailed to the scm."
  echo "Continue? y/n"
  read begin
  echo
done

if [ $begin = y ]
then
  echo "Ready to calculate checksums......"
  echo
  mkdir $relDisk/$installdir/checksum

#
# Check sum in Unix/sun2.4 directory
#

  echo $relDisk/$rel/Unix/sun2.4/bin >> $relDisk/$installdir/checksum/SUM$tag
  for filename in `grep -h "Host" tistasksfiles | awk '{ print $1 }'`
  do 
   echo >> $relDisk/$installdir/checksum/SUM$tag
   echo $filename | awk '{ printf "%-30s", $1 }' >> $relDisk/$installdir/checksum/SUM$tag 
   sum $relDisk/$rel/Unix/sun2.4/bin/$filename | awk '{ printf "\t%d\t%d", $1, $2 }' >> $relDisk/$installdir/checksum/SUM$tag
  done

#
# Check sum in Tornado directory
#

  if [ "$tortype" = Tornado ] || [ "$tortype" = both ]
  then
    echo >> $relDisk/$installdir/checksum/SUM$tag
    echo >> $relDisk/$installdir/checksum/SUM$tag
    echo $relDisk/$rel/Tornado/bin/$targetIOC  >> $relDisk/$installdir/checksum/SUM$tag
    for filename in `grep -h "IOC" tistasksfiles | awk '{ print $1 }'`
    do
     echo >> $relDisk/$installdir/checksum/SUM$tag
     echo $filename | awk '{ printf "%-30s", $1 }' >> $relDisk/$installdir/checksum/SUM$tag
     sum $relDisk/$rel/Tornado/bin/$targetIOC/$filename | awk '{ printf "\t%d\t%d", $1, $2 }' >> $relDisk/$installdir/checksum/SUM$tag
    done
  fi

#
# Check sum in Tornado2 directory
#

  if [ "$tortype" = Tornado2 ] || [ "$tortype" = both ]
  then
    echo >> $relDisk/$installdir/checksum/SUM$tag
    echo >> $relDisk/$installdir/checksum/SUM$tag
    echo $relDisk/$rel/Tornado2/bin/$targetIOC >> $relDisk/$installdir/checksum/SUM$tag
    for filename in `grep -h "IOC" tistasksfiles | awk '{ print $1 }'`
    do 
     echo >> $relDisk/$installdir/checksum/SUM$tag
     echo $filename | awk '{ printf "%-30s", $1 }'>> $relDisk/$installdir/checksum/SUM$tag
     sum $relDisk/$rel/Tornado2/bin/$targetIOC/$filename | awk '{ printf "\t%d\t%d", $1, $2 }' >> $relDisk/$installdir/checksum/SUM$tag 
    done
  fi

fi

 
mail scm < $relDisk/$installdir/checksum/SUM$tag


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>