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 7BASE_DIR=/usr/projects/samba/tdb 8 9rm -rf .pc 10 11FILES="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 15echo "/*" > tdb.c 16grep ^URL .svninfo >> tdb.c 17grep "^Last Changed Rev" .svninfo | sed -e 's/Last Changed //' >> tdb.c 18grep "^Last Changed Date" .svninfo >> tdb.c 19echo "*/" >> tdb.c 20 21cat $BASE_DIR/common/tdb_private.h >> tdb.c 22for 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 28done 29 30cp $BASE_DIR/include/tdb.h . 31cp $BASE_DIR/tools/tdbtool.c . 32 33quilt push -a 34 35