-
Notifications
You must be signed in to change notification settings - Fork 19
/
heehaw
executable file
·58 lines (45 loc) · 948 Bytes
/
heehaw
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
#!/bin/bash
echo We have switched to a new building system.
echo Say if you want to build examples/image,
echo just cd examples/image and type make
exit
PLUGIN=$1
PROTOCOL=$2
if [ -z "$PLUGIN" ]
then
echo usage:
echo './heehaw <plugin>'
echo 'plugin: qbic'
exit 1
fi
if [ -z "$PROTOCOL" ]
then
PROTOCOL=thrift
else
echo "Multiple protocols are not supported. We currently support thrift only."
fi
PLUGIN_DIR=plugins/$PLUGIN
if [ ! -d plugins/$PLUGIN ]
then
echo Plugin $PLUGIN does not exist.
exit 2
fi
rm -f src/Makefile.protocol.inc
if [ "$PROTOCOL" = http ]
then
ln -s Makefile.http.inc src/Makefile.protocol.inc
elif [ "$PROTOCOL" = grpc ]
then
ln -s Makefile.grpc.inc src/Makefile.protocol.inc
elif [ "$PROTOCOL" = thrift ]
then
ln -s Makefile.thrift.inc src/Makefile.protocol.inc
else
echo PROTOCOL should be http or grpc or thrift
exit 5
fi
rm -rf src/plugin
ln -s $PWD/$PLUGIN_DIR src/plugin
pushd src
make
popd