forked from jjhenkel/c2ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·36 lines (31 loc) · 854 Bytes
/
setup
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
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Building c2ocaml plugin image..."
#/usr/bin/time -v -o $DIR/Logs/c2ocaml-image-build.time \
docker build \
-t jjhenkel/c2ocaml \
-f $DIR/Dockerfile $DIR \
&> $DIR/logs/c2ocaml-image-build.log
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "Plugin image failed to build."
exit $STATUS
else
echo "Image build complete!"
fi
echo "Populating volume with compiled so..."
docker rm build-c2ocaml &> /dev/null
#/usr/bin/time -v -o $DIR/Logs/c2ocaml-plugin-build.time \
docker run --name=build-c2ocaml \
--volumes-from=c2ocaml-gcc7.2.0:ro \
-v $DIR/plugin:/app/Lets/Transform/plugin \
jjhenkel/c2ocaml \
&> $DIR/logs/c2ocaml-plugin-build.log
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "Plugin build failed."
exit $STATUS
else
echo "Volume populated!"
exit 0
fi