head	0.4;
access;
symbols
	RELEASE_1_0:0.3;
locks; strict;
comment	@# @;


0.4
date	96.12.12.02.11.52;	author evans911;	state Exp;
branches;
next	0.3;

0.3
date	96.12.11.03.21.38;	author evans911;	state Exp;
branches;
next	0.2;

0.2
date	96.12.11.03.15.54;	author evans911;	state Exp;
branches;
next	0.1;

0.1
date	96.12.11.03.00.43;	author evans911;	state Exp;
branches;
next	;


desc
@@


0.4
log
@It turns out that print isn't compatible with bash.  Fixed.
@
text
@#!/bin/sh
#
# $Source: /net/dworshak2/users/student/evans911/prog/cs481/RCS/build,v $
# $Author: evans911 $
# Current revision: $Revision: 0.3 $
# Last modified: $Date: 1996/12/11 03:21:38 $
# State of current revision: $State: Exp $
# Currently locked by: $Locker: evans911 $
#
# Description: Bootstrap script for building the cca script.
#              
# $Log: build,v $
# Revision 0.3  1996/12/11 03:21:38  evans911
# Fixed stupid path problems.
#
# Revision 0.2  1996/12/11 03:15:54  evans911
# Hopefully catching errors in "merge" now.
#
# Revision 0.1  1996/12/11 03:00:43  evans911
# Initial revision
#
#

if [ "$1" = "" ] ; then
  perlexec=perl;
elif [ "$1" = "-h" ] ; then
  echo "Usage: build [ <perl_name> | -h ]"
  exit;
else
  perlexec=$1;
fi

goodness=0 # 0 means not found, 1 means 5.001 found, 2 means 5.002+ found

for i in $PERL_EXE_PATH `echo $PATH |tr -s ":" "\n"` 
do
  if [ -x $i/$perlexec ] ; then
    version=`$i/$perlexec -v |grep "This is perl, version" |awk '{print $5}'`
    major=`echo $version | cut -d "." -f 1`
    minor=`echo $version | cut -d "." -f 2`
    if [ $major -ge 5 ] ; then
      if [ $minor -ge 2 ] ; then
	echo "$i/$perlexec is $version.  Good."
	use=$i/$perlexec
	goodness=2
	break;
      elif [ $minor -eq 1 ] ; then
	echo "$i/$perlexec is version $version.  Hoping for something newer..."
	use=$i/$perlexec
	goodness=1
      else
	echo "$i/$perlexec is version $version.  Need at least 5.001.";
      fi
    else
      echo "$i/$perlexec (version $version) is too old.";
    fi
  fi
done

echo ""

if [ $goodness -eq 2 ] ; then
  echo "";
elif [ $goodness -eq 1 ] ; then
  echo "Warning: Perl 5.001 has known problems with large strings, so you may"
  echo "not be able to successfully complete runs on large input files."
  echo "";
else 
  echo "Couldn't find a useable version of Perl.  You can specify a directory"
  echo "to look in by defining the shell variable PERL_EXE_PATH.  You can"
  echo "also specify a different filename by running this script as"
  echo "\"build <filename>\"."
  exit;
fi

echo "About to run merge..."
echo "#!$use" > ./merge
#echo "$use" >> ./merge
cat src/pmerge.pl >> ./merge
chmod u+x ./merge

if (cd src ; ../merge $use ../bin/cca) ; then
  echo "Done!";
else
  echo "Error: merge had a problem."
  exit;
fi

@


0.3
log
@Fixed stupid path problems.
@
text
@d3 1
a3 1
# $Source: /net/dworshak2/users/student/evans911/prog/cca/RCS/build,v $
d5 2
a6 2
# Current revision: $Revision: 0.2 $
# Last modified: $Date: 1996/12/11 03:15:54 $
d13 3
d27 1
a27 1
  print "Usage: build [ <perl_name> | -h ]"
d60 1
a60 1
print ""
d63 1
a63 1
  print -n "";
d65 3
a67 3
  print "Warning: Perl 5.001 has known problems with large strings, so you may"
  print "not be able to successfully complete runs on large input files."
  print "";
d69 4
a72 4
  print "Couldn't find a useable version of Perl.  You can specify a directory"
  print "to look in by defining the shell variable PERL_EXE_PATH.  You can"
  print "also specify a different filename by running this script as"
  print "\"build <filename>\"."
d76 3
a78 3
print "About to run merge..."
print -n "#!" > ./merge
echo "$use" >> ./merge
d83 1
a83 1
  print "Done!";
d85 1
a85 1
  print "Error: merge had a problem."
@


0.2
log
@Hopefully catching errors in "merge" now.
@
text
@d5 2
a6 2
# Current revision: $Revision: 0.1 $
# Last modified: $Date: 1996/12/11 03:00:43 $
d13 3
d73 1
d79 1
a79 1
if (./merge $use bin/cca) ; then
@


0.1
log
@Initial revision
@
text
@d3 6
a8 6
# $Source:$
# $Author:$
# Current revision: $Revision:$
# Last modified: $Date:$
# State of current revision: $State:$
# Currently locked by: $Locker:$
d12 3
a14 1
# $Log:$
d16 1
d75 6
a80 3
./merge $use cca

print "Done!"
@
