comparison dockerbuild.sh @ 106:76badb3a0bb3 vampy-2.1

Add mechanism to build a "standard" Linux .so using Docker
author Chris Cannam
date Tue, 05 Feb 2019 12:48:59 +0000
parents
children 169e04e81ea0
comparison
equal deleted inserted replaced
105:d5220acc1403 106:76badb3a0bb3
1 #!/bin/bash
2 #
3 # Docker required!
4
5 set -eu
6
7 current=$(hg id | awk '{ print $1; }')
8
9 case "$current" in
10 *+) echo "WARNING: Current working copy has been modified - build will check out the last commit, which must perforce be different";;
11 *);;
12 esac
13
14 current=${current%%+}
15
16 rm -f vampy.so
17
18 cat Dockerfile.in | perl -p -e 's/\[\[REVISION\]\]/'"$current"'/' > Dockerfile
19
20 dockertag="cannam/vampy-$current"
21
22 sudo docker build -t "$dockertag" -f Dockerfile .
23
24 container=$(sudo docker create "$dockertag")
25 sudo docker cp "$container":vampy/vampy.so .
26 sudo docker rm "$container"
27
28 ldd vampy.so
29 VAMP_PATH=".:./Example VamPy plugins" ../vamp-plugin-sdk/host/vamp-simple-host -l
30
31 echo "Done!"
32