-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
executable file
·57 lines (45 loc) · 1.13 KB
/
build.sh
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
53
54
55
56
57
#!/bin/bash
set -e
function build_python() {
mkdir -p build
cd build
cp ../setup.py .
cp -r ../starster .
cp -r ../mast3r/mast3r .
cp -r ../mast3r/dust3r/dust3r .
# Workaround for mast3r code; copy dust3r into itself.
cp -r ../mast3r/dust3r/dust3r dust3r/
cp -r ../mast3r/dust3r/croco/models .
# WOrkaround; copy croco into dust3r.
cp -r ../mast3r/dust3r/croco dust3r/
# Workaround for missing init.
touch models/__init__.py dust3r/croco/__init__.py dust3r/croco/models/__init__.py
python setup.py sdist bdist_wheel
}
function build_blender() {
mkdir -p build/blender
cd build/blender
cp -r ../../blender starster_blender
zip -r starster.zip starster_blender
}
function install_python() {
./build.sh python
pip install build/dist/*.whl -U --no-deps
}
function build_docs() {
./build.sh install
cd docs
make html
}
if [ "$1" == "python" ]; then
build_python
elif [ "$1" == "blender" ]; then
build_blender
elif [ "$1" == "install" ]; then
install_python
elif [ "$1" == "docs" ]; then
build_docs
else
echo "Invalid usage."
exit 1
fi