-
Notifications
You must be signed in to change notification settings - Fork 0
/
vxl_entrypoint.bsh
executable file
·40 lines (37 loc) · 1.62 KB
/
vxl_entrypoint.bsh
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
#!/usr/bin/env bash
set -eu
if [ "${@+$1}" == "vxl" ]; then
source /opt/vip/vip.bsh
if [ ! -d /vxl/build/${VIP_VXL_BUILD_TYPE} ]; then
mkdir -p /vxl/build/${VIP_VXL_BUILD_TYPE}
fi
if [ ! -e /vxl/build/${VIP_VXL_BUILD_TYPE}/CMakeCache.txt ]; then
cd /vxl/build/${VIP_VXL_BUILD_TYPE}
cmake -G Ninja /vxl_src ${VIP_VXL_CMAKE_ENTRIES}
fi
cd /vxl/build/${VIP_VXL_BUILD_TYPE}
ninja -j ${NUMBER_OF_PROCESSORS-$(nproc)}
if [ "${VIP_VXL_SMALL_COPY}" == "0" ]; then
rsync -av ./bin /vxl
rsync -av ./lib/*.a /vxl/lib
else
rsync -av ./bin/bwm_triangulate_2d_corrs /vxl/bin/
fi
mkdir -p /vxl/lib/python2.7/site-packages/vxl/
rsync -rlptDv --chmod=D755,F644 \
$(find /vxl_src/ -type d -name pyscripts | sed 's|$|/*|' | grep -v core ) \
/vxl/lib/python2.7/site-packages/vxl/
rsync -rlptDv --chmod=D755,F644 \
/vxl_src/contrib/brl/bpro/core/pyscripts/* \
/vxl/lib/python2.7/site-packages/vxl/
rsync -av ./lib/*.so /vxl/lib/python2.7/site-packages/vxl/
mkdir -p /vxl/share/vxl/cl
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bseg/boxm2/ocl/cl/ /vxl/share/vxl/cl/boxm2
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bseg/boxm2/reg/ocl/cl/ /vxl/share/vxl/cl/reg
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bseg/boxm2/vecf/ocl/cl/ /vxl/share/vxl/cl/vecf
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bseg/boxm2/volm/cl/ /vxl/share/vxl/cl/volm
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bseg/bstm/ocl/cl/ /vxl/share/vxl/cl/bstm
rsync -rlptDv --chmod=D755,F644 /vxl_src/contrib/brl/bbas/volm/*_*.txt /vxl/share/vxl
else
exec "${@}"
fi