#!/bin/sh
#
# Ganymede client jar build script
#
# Version: $Revision: 1.14 $
# Date: $Date: 2000/05/27 00:32:56 $
#
############################################################

currentdir=`pwd`

# Change to the directory where this build script is

prog=$0
builddir=`echo $prog|sed 's%/[^/][^/]*$%%'`
test "x$builddir" = "x$builddir" && builddir=.
cd $builddir

# Load configuration information

. ./config.sh

# And do the build

echo "Building client jar"

cd $TARGETDIR

mv -f ganymede.jar ganymede.jar.old > /dev/null 2>&1

cd client_classes

# We need the Util directory

cd arlut/csd
rm -f Util
ln -s $TARGETDIR/arlut/csd/Util Util
cd ../..

#
# And the XML class directories
#

# The SAX classes

rm -f org
ln -s $TARGETDIR/org org

# James Clark's parser classes

rm -f com
ln -s $TARGETDIR/com com

# And the JDataComponent directory

cd arlut/csd
rm -f JDataComponent
ln -s $TARGETDIR/arlut/csd/JDataComponent JDataComponent
cd ../..

# And the JCalendar directory

cd arlut/csd
rm -f JCalendar
ln -s $TARGETDIR/arlut/csd/JCalendar JCalendar
cd ../..

# And the JDialog directory

cd arlut/csd
rm -f JDialog
ln -s $TARGETDIR/arlut/csd/JDialog JDialog
cd ../..

# And the JTable directory

cd arlut/csd
rm -f JTable
ln -s $TARGETDIR/arlut/csd/JTable JTable
cd ../..

# And the JTree directory

cd arlut/csd
rm -f JTree
ln -s $TARGETDIR/arlut/csd/JTree JTree
cd ../..

./sync_tree

$JAVADIR/jar -cf ../ganymede.jar arlut com org

cd ..

echo "Done building client jar"
