2011-12-18 20:54:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-03-12 20:56:00 +00:00
|
|
|
WT_BRANCH=basho
|
2013-04-01 20:17:18 +00:00
|
|
|
WT_REMOTE_REPO=http://github.com/wiredtiger/wiredtiger.git
|
2011-12-18 20:54:46 +00:00
|
|
|
|
2012-04-04 19:20:08 +00:00
|
|
|
[ `basename $PWD` != "c_src" ] && cd c_src
|
2011-12-18 20:54:46 +00:00
|
|
|
|
|
|
|
BASEDIR="$PWD"
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
clean)
|
2013-03-12 20:56:00 +00:00
|
|
|
rm -rf system wiredtiger
|
2011-12-18 20:54:46 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
test -f system/lib/libwiredtiger.a && exit 0
|
|
|
|
|
2013-03-16 20:41:26 +00:00
|
|
|
if [ -d wiredtiger/.git ]; then
|
|
|
|
(cd wiredtiger && \
|
|
|
|
git fetch && \
|
|
|
|
git merge origin/$WT_BRANCH)
|
|
|
|
else
|
2013-04-01 20:17:18 +00:00
|
|
|
git clone -b $WT_BRANCH --single-branch $WT_REMOTE_REPO && \
|
|
|
|
(cd wiredtiger && \
|
|
|
|
patch -p1 < ../wiredtiger-extension-link.patch && \
|
|
|
|
./autogen.sh)
|
2013-03-16 20:41:26 +00:00
|
|
|
fi
|
|
|
|
(cd wiredtiger/build_posix && \
|
2012-02-16 19:54:05 +00:00
|
|
|
../configure --with-pic \
|
2013-03-28 14:24:26 +00:00
|
|
|
--enable-snappy \
|
|
|
|
--enable-bzip2 \
|
2011-12-18 20:54:46 +00:00
|
|
|
--prefix=$BASEDIR/system && \
|
2013-03-28 14:24:26 +00:00
|
|
|
make -j && make install)
|
2013-04-01 18:00:06 +00:00
|
|
|
[ -d $BASEDIR/../priv ] || mkdir $BASEDIR/../priv
|
|
|
|
cp $BASEDIR/system/bin/wt $BASEDIR/../priv
|
|
|
|
cp $BASEDIR/system/lib/*.so $BASEDIR/../priv
|
2011-12-18 20:54:46 +00:00
|
|
|
;;
|
|
|
|
esac
|