-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·41 lines (33 loc) · 768 Bytes
/
build.sh
File metadata and controls
executable file
·41 lines (33 loc) · 768 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
#!/bin/bash
pushd sgf-parse;
mkdir -p build
cd build/
if [[ "$1" != "debug" ]]; then
cmake -DCMAKE_BUILD_TYPE=Release ..
else
cmake -DCMAKE_BUILD_TYPE=Debug ..
fi
make -j $(nproc || echo 4);
popd;
pycmd='python2'
if ! which $pycmd; then
pycmd='python'
fi
if ! ($pycmd --version 2>&1 | grep '^Python 2\.7'); then
echo "Need python 2.7"
exit -1
fi
if ! [[ -e venv ]]; then
echo
echo "Grabbing virtualenv"
echo
wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py
$pycmd virtualenv.py --no-setuptools --no-pip --no-wheel venv
. venv/bin/activate
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip --version || exit -1
else
. venv/bin/activate
fi
pip install -r requirements.txt