-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_data.sh
executable file
·61 lines (49 loc) · 1.53 KB
/
build_data.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
58
59
60
61
#!/bin/bash
VM=$1
OUT=$2
KEEP=$3
if [ -z $OUT ];then
echo "Usage $0 <vm> <DEB|RPM> [keep]"
exit
fi
if [ -z $PARALLEL ];then
PARALLEL=3
fi
echo "Running docker on $VM"
echo "PARALLEL=$PARALLEL"
if [ -z $KEEP ];then
KEEP="--rm"
else
KEEP=""
fi
# make sure output directory is writable to the container
mkdir -p packages
chmod a+w packages
docker run ${KEEP} -i --volume $(pwd)/packages:/home/nistmni/build $VM /bin/bash <<END
mkdir src
cd src
git clone --recursive --branch master https://github.com/BIC-MNI/minc-toolkit-testsuite.git minc-toolkit-testsuite && \
mkdir -p build/minc-toolkit-testsuite && \
cd build/minc-toolkit-testsuite && \
cmake ../../minc-toolkit-testsuite -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/minc && \
make -j${PARALLEL} && \
cpack -G ${OUT} && \
cp -v *.rpm *.deb ~/build/
cd ~/src/
git clone --recursive --branch master https://github.com/BIC-MNI/BEaST_library.git BEaST_library && \
mkdir -p build/BEaST_library && \
cd build/BEaST_library && \
cmake ../../BEaST_library -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/minc && \
make -j${PARALLEL} && \
cpack -G ${OUT} && \
cp -v *.rpm *.deb ~/build/
cd ~/src/
git clone --recursive --branch master https://github.com/BIC-MNI/bic-mni-models.git bic-mni-models && \
mkdir -p build/bic-mni-models && \
cd build/bic-mni-models && \
cmake ../../bic-mni-models -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/minc && \
make -j${PARALLEL} && \
cpack -G ${OUT} && \
cp -v *.rpm *.deb ~/build/
END
exit