#!/bin/csh -f
#
# This shell script creates the compressed okbridge tar file which
# is distributed.  Unfortunately, it seems that the "make" command
# on some systems is not smart enough to handle the work which is
# done by this file.
#
setenv MAJOR `grep 'major_rev.*=' types.h | sed 's@.*"\(.*\)".*@\1@'`
setenv MINOR `grep 'minor_rev.*=' types.h | sed 's@.*"\(.*\)".*@\1@'`
setenv OKFILENAME okbridge-$MAJOR$MINOR
setenv OKBDIR `pwd | sed "s@.*/\([^/]*\)@\1@"`
cd .. 
tar -cf $OKFILENAME.tar $OKBDIR
if ($1 == 'gzip') then
  echo GZtar\'ing $OKBDIR into $OKFILENAME.tar.gz
  gzip -f $OKFILENAME.tar
else
  echo Ztar\'ing $OKBDIR into $OKFILENAME.tar.Z
  compress $OKFILENAME.tar
endif
 
