1 #!/bin/sh 2 # 3 # This file creates a stand-alone TDB based on a set of sources from 4 # Samba 5 6 #BASE_DIR=/usr/projects/samba/samba-4.0.0tp4/source/lib/tdb 7 BASE_DIR=/usr/projects/samba/tdb 8 9 rm -rf .pc 10 11 FILES="error.c lock.c io.c transaction.c freelist.c \ 12 freelistcheck.c traverse.c dump.c tdb.c open.c" 13 14 (cd $BASE_DIR/common; svn info ) > .svninfo 15 echo "/*" > tdb.c 16 grep ^URL .svninfo >> tdb.c 17 grep "^Last Changed Rev" .svninfo | sed -e 's/Last Changed //' >> tdb.c 18 grep "^Last Changed Date" .svninfo >> tdb.c 19 echo "*/" >> tdb.c 20 21 cat $BASE_DIR/common/tdb_private.h >> tdb.c 22 for i in $FILES; do 23 if [ `tail -n 1 tdb.c | wc -c` -gt 1 ]; then 24 printf "\n" >> tdb.c 25 fi 26 echo "/* file: $i */" >> tdb.c 27 sed -e '1,/#include "tdb_private.h"/d' < $BASE_DIR/common/$i >> tdb.c 28 done 29 30 cp $BASE_DIR/include/tdb.h . 31 cp $BASE_DIR/tools/tdbtool.c . 32 33 quilt push -a 34 35