#!/bin/sh
#------------------------------------------------------------------------------
# CLiCC: The Common Lisp to C Compiler
# Copyright (C) 1994 Wolfgang Goerigk, Ulrich Hoffmann, Heinz Knutzen
# Christian-Albrechts-Universitaet zu Kiel, Germany
#------------------------------------------------------------------------------
# Function : tar CLiCC Release into archive ./clicc-xxx.tar
#
# $Revision: 1.3 $
# $Id: tar-clicc,v 1.3 1994/11/22 15:11:46 hk Exp $
#------------------------------------------------------------------------------

curdir=`pwd`

# Determining the name of the release directory
echo ";;; Changing working directory to $CLICCROOT"
cd $CLICCROOT
base=`/usr/bin/pwd`
base=`basename $base`

tarfile=$base.tar
include=/tmp/tar-include$$
exclude=/tmp/tar-exclude$$
rm -f $include $exclude

# Directories with extra files which are not RCS controled
rtlc=$base/src/runtime/lisp2c
lib=$base/lib
doc=$base/doc

# RCS controled files
echo "Assembling list of RCS controled files"
for dir in `tail +2 RCS-directories`; do
 for file in `tail +2 $dir/RCS-files`; do
  echo $base/$dir/$file >>$include
 done
done

# Building the exlude list
cd ..
echo "Assembling list of files which will be excluded from the release"
ls -d $base/bib $base/doc/*.tex $base/doc/*.fig >$exclude

echo ";;; Assembling CLiCC source code release in directory `/usr/bin/pwd` ..."
tar cvfX $curdir/$tarfile $exclude -I $include \
 $lib/sys.h \
 $doc/*.Z \
 $rtlc/*.[ch] $rtlc/*.def $rtlc/*.syntax

echo ";;; $curdir/$tarfile created."

rm $include $exclude

#-----------------------------------------------------------------
echo ";;; Changing working directory back to $curdir"
cd $curdir
#-----------------------------------------------------------------
ViewGit