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