forked from aviggiano/redis-roaring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sh
executable file
·68 lines (60 loc) · 1.19 KB
/
configure.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
function configure_submodules()
{
git submodule init
git submodule update
git submodule status
}
function configure_croaring()
{
pushd .
cd deps/CRoaring
# generates header files
./amalgamation.sh
# https://github.com/RoaringBitmap/CRoaring#building-with-cmake-linux-and-macos-visual-studio-users-should-see-below
mkdir -p build
cd build
cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Debug ..
make
popd
}
function configure_redis()
{
cd deps/redis
make
cd -
}
function configure_hiredis()
{
cd deps/hiredis
make
cd -
}
function build()
{
mkdir -p build
cd build
cmake ..
make
local LIB=$(find libredis-roaring*)
cd ..
mkdir -p dist
cp "build/$LIB" dist
cp deps/redis/redis.conf dist
cp deps/redis/src/{redis-benchmark,redis-check-aof,redis-check-rdb,redis-cli,redis-sentinel,redis-server} dist
echo "loadmodule $(pwd)/dist/$LIB" >> dist/redis.conf
}
function instructions()
{
echo ""
echo "Start redis server with redis-roaring:"
echo "./dist/redis-server ./dist/redis.conf"
echo "Connect to server:"
echo "./dist/redis-cli"
}
configure_submodules
configure_croaring
configure_redis
configure_hiredis
build
instructions