-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
29 lines (21 loc) · 784 Bytes
/
Copy pathbuild.sh
File metadata and controls
29 lines (21 loc) · 784 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
#!/bin/bash
# Build both instantgrep and instantgrep-bench escripts
set -e
echo "==> Fetching dependencies..."
mix deps.get
echo "==> Building PCRE2-JIT NIF and ig client..."
make all
echo "==> Compiling..."
mix compile
echo "==> Building instantgrep-daemon escript..."
mix escript.build
echo "==> Setting up instantgrep wrapper..."
cp cli_wrapper.sh instantgrep
chmod +x instantgrep
echo "==> Building instantgrep-bench escript..."
# Build the bench escript by temporarily switching the main_module
MIX_ENV=prod mix escript.build --name instantgrep-bench --main-module Instantgrep.Bench 2>/dev/null || \
mix escript.build
echo ""
echo "Built:"
ls -la ig_client instantgrep instantgrep-daemon instantgrep-bench 2>/dev/null || ls -la ig_client instantgrep instantgrep-daemon