#!/bin/sh
# This script generates an index file for the library
# given, under loose cca assumptions. 

dstring=`date`
pstring=`pwd`/
if test "x$4" != "x" ; then
  pstring="$4"
fi
if test "x$6" != "x" ; then
  typestring="$6"
else
  typestring=classic
fi
if test "x$5" != "x" ; then
  aliasstring="$5"
else
  aliasstring=$3
fi
cat << __EOF1
# generated CCAFFEINE dynamic library index.
# The ! lines should not contain whitespace before the =
# unless they begin with something other than date,builder,location.
# There may be more than 1 library in a .cca file, in which case
# last ! meta data seen wins for following library and component info.
# Note that if you want to change the user's "apparent" class name
# seen in the UI, you can change the name following the constructor function
# name in this file.
# N.B.:
# This is the exceedingly-poor-mans version of some of the info
# we'd want from a repository. See genDLIndexXML.
!date=$dstring
!builder=$USER@$HOST
!componentType=$typestring
!location=$pstring
$1
$2 $aliasstring

__EOF1
exit 0
