head	1.2;
access;
symbols
	rpm-4_4_8-release:1.1.2.1
	rpm-4_4_7-release:1.1.2.1
	db-4_5_20:1.2
	rpm-4_4_6-release:1.1.2.1
	rpm-4_4_5-release:1.1.2.1
	db-4_4_20:1.2
	rpm-4_4_4-release:1.1.2.1
	db-4_4_16:1.2
	rpm-4_4_3-release:1.1.2.1
	db-4_4_11:1.2
	db-4_3_29:1.1
	jbj_before_tklcpatches:1.1
	rpm-4_4_2-release:1.1
	pjones-sparse-experiment:1.1.0.4
	db-4_4_4:1.1
	rpm-4_4_1-release:1.1
	db-4_3_27:1.1
	rpm-4_4-release:1.1
	rpm-4_4:1.1.0.2
	db-4_3_21:1.1
	db-4_3_14:1.1;
locks; strict;
comment	@# @;


1.2
date	2005.10.28.17.13.18;	author jbj;	state Exp;
branches;
next	1.1;

1.1
date	2004.10.16.01.31.55;	author jbj;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2005.10.28.18.44.32;	author jbj;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update to db-4.4.11.
@
text
@#!/bin/sh -

# The examples must be hand-edited after they are copied:
# - add setInitializeCache(true), setInitializeLocking(true), setType(BTREE)
# - add null databaseName param to openDatabase() and openSecondaryDatabase()
# - remove foreign key configuration and imports

COPY_EXAMPLES=0

JEDIR=$1
if [ $# -eq 1 ] ; then
    DBDIR=..
else
    DBDIR=$2
fi

if [ ! -d "$DBDIR/dbinc" -o ! -f "$JEDIR/build.xml" ] ; then
	echo >&2 "Usage $0 /path/to/je [ /path/to/db ]"
	exit 1
fi

JEDIR=$(cd "$JEDIR" ; /bin/pwd)
DBDIR=$(cd "$DBDIR" ; /bin/pwd)

JESRC="$JEDIR/src"
JETEST="$JEDIR/test"
JEEXAMPLES="$JEDIR/examples"
DBSRC="$DBDIR/java/src"
DBTEST="$DBDIR/test/scr024/src"
DBEXAMPLES="$DBDIR/examples_java/src"
DIRMATCH="com/sleepycat\(/examples\)*/\(\(bind\)\|\(collections\)\|\(util\)\)"

cd "$JESRC"
for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
	#echo "$DBSRC/$d"
	mkdir -p "$DBSRC/$d"
done
cd "$JETEST"
for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
	#echo "$DBTEST/$d"
	mkdir -p "$DBTEST/$d"
done
if [ $COPY_EXAMPLES -eq 1 ] ; then
    cd "$JEEXAMPLES"
    for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
            #echo "$DBEXAMPLES/$d"
            mkdir -p "$DBEXAMPLES/$d"
    done
fi

E1='s/com\.sleepycat\.je/com.sleepycat.db/g'
E2='/import com\.sleepycat\.db\.ForeignKeyNullifier/d'
E3='/implements/s/, ForeignKeyNullifier//'
E4='/<!-- begin JE only -->/,/<!-- end JE only -->/d'
EXCLUDETESTS="\(\(ForeignKeyTest\)\|\(TupleSerialFactoryTest\)\\|\(XACollectionTest\)\)"

cd "$JESRC"
for f in `find . -name '*.java' | grep $DIRMATCH` ; do
	#echo $DBSRC/$f
	sed -e "$E1" -e "$E2" -e "$E3" -e "$E4" < $f > $DBSRC/$f.sed.out
        diff -q -I "\$\Id:" $DBSRC/$f $DBSRC/$f.sed.out || \
            mv -f $DBSRC/$f.sed.out $DBSRC/$f
        rm -f $DBSRC/$f.sed.out
done

cd "$JETEST"
for f in `find . -name '*.java' | grep $DIRMATCH | grep -v $EXCLUDETESTS` ; do
	#echo $DBTEST/$f
	sed -e "$E1" < $f > $DBTEST/$f.sed.out
        diff -q -I "\$\Id:" $DBTEST/$f $DBTEST/$f.sed.out || \
            mv -f $DBTEST/$f.sed.out $DBTEST/$f
        rm -f $DBTEST/$f.sed.out
done
cp -f "com/sleepycat/collections/test/serial/TestSerial.java.original" \
      "$DBTEST/com/sleepycat/collections/test/serial"

if [ $COPY_EXAMPLES -eq 1 ] ; then
    cd "$JEEXAMPLES"
    for f in `find . -name '*.java' | grep $DIRMATCH` ; do
            #echo $DBEXAMPLES/$f
            sed -e "$E1" < $f > $DBEXAMPLES/$f.sed.out
            diff -q -I "\$\Id:" $DBEXAMPLES/$f $DBEXAMPLES/$f.sed.out || \
                mv -f $DBEXAMPLES/$f.sed.out $DBEXAMPLES/$f
            rm -f $DBEXAMPLES/$f.sed.out
    done
fi

exit 0
@


1.1
log
@... and in with the New ...
@
text
@d55 1
a55 1
EXCLUDETESTS="\(\(ForeignKeyTest\)\|\(TupleSerialFactoryTest\)\)"
@


1.1.2.1
log
@Update to db-4.4.11.
@
text
@d55 1
a55 1
EXCLUDETESTS="\(\(ForeignKeyTest\)\|\(TupleSerialFactoryTest\)\\|\(XACollectionTest\)\)"
@


