-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimport.sh
More file actions
executable file
·43 lines (35 loc) · 748 Bytes
/
import.sh
File metadata and controls
executable file
·43 lines (35 loc) · 748 Bytes
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
#!/usr/bin/env sh
set -eu
URL="https://github.com/graphql/libgraphqlparser/archive/master.tar.gz"
rm -rf *.cpp internal/*
docker run --rm \
-v $PWD/internal:/data/libgraphqlparser \
-e LIBGRAPHQLPARSER_URL=$URL \
tecbot/libgraphqlparser
# apply patches
patch -p1 < includes.patch
patch -p1 < gitignore.patch
# stuff we need to compile.
SOURCES='
Ast.cpp
GraphQLParser.cpp
JsonVisitor.cpp
lexer.cpp
parser.tab.cpp
'
# symlink so cgo compiles them
for file in $SOURCES; do
ln -sf internal/$file .
done
# stuff we need to compile.
SOURCES='
GraphQLAst.cpp
GraphQLAstNode.cpp
GraphQLAstToJSON.cpp
GraphQLAstVisitor.cpp
GraphQLParser.cpp
'
# symlink so cgo compiles them
for file in $SOURCES; do
ln -sf internal/c/$file ./c_$file
done