forked from btcsuite/btcd
-
Notifications
You must be signed in to change notification settings - Fork 26
/
do
executable file
·41 lines (33 loc) · 721 Bytes
/
do
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
#!/usr/bin/env sh
# check for the presence of --protoc flag and remove it from ARGS passed to the compile step
BUILD_ARGS=""
PROTOC="false"
while [ true ]
do
ARG=${1}
if [ -z "${ARG}" ]
then
break
fi
if [ "${ARG}" == "--protoc" ]
then
PROTOC="true"
else
BUILD_ARGS="${BUILD_ARGS} \"${ARG}\""
fi
shift
done
# when requested, generate stubs from gRPC proto files
if [ "${PROTOC}" == "true" ]
then
cd lnd/lnrpc
./gen_protos.sh
if [ $? -ne 0 ]
then
echo "${0}: fail attempting to generate stubs from gRPC proto files"
exit 1
fi
cd ../..
fi
# build source code
eval go run ./contrib/build/build.go ${BUILD_ARGS}