forked from aaalgo/donkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheehaw
executable file
·54 lines (41 loc) · 785 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
#!/bin/bash
echo heehaw
PLUGIN=$1
PROTOCOL=$2
if [ -z "$PLUGIN" ]
then
echo usage:
echo './heehaw <plugin> [protocol]'
echo 'plugin: qbic'
echo 'protocol: thrift (default), grpc'
exit 1
fi
if [ -z "$PROTOCOL" ]
then
PROTOCOL=thrift
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