Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / docker / build.sh
1 #! /bin/bash
2
3 # make sure a Ruby version greater than or equal to 1.9.3 is installed before proceeding
4 if ! ruby -e 'exit RUBY_VERSION >= "1.9.3"' 2>/dev/null
5 then
6     echo "Building the Arvados docker containers requires at least Ruby 1.9.3."
7     echo "Please install ruby 1.9.3 or higher before executing this script."
8     exit 1
9 fi
10
11 function usage {
12     echo >&2
13     echo >&2 "usage: $0 [options]"
14     echo >&2
15     echo >&2 "Calling $0 without arguments will build all Arvados docker images"
16     echo >&2
17     echo >&2 "$0 options:"
18     echo >&2 "  -h, --help   Print this help text"
19     echo >&2 "  clean        Clear all build information"
20     echo >&2 "  realclean    clean and remove all Arvados Docker images except arvados/debian"
21     echo >&2 "  deepclean    realclean and remove arvados/debian, crosbymichael/skydns and "
22     echo >&2 "               crosbymichael/skydns Docker images"
23     echo >&2
24 }
25
26 if [ "$1" = '-h' ] || [ "$1" = '--help' ]; then
27   usage
28   exit 1
29 fi
30
31 build_tools/build.rb
32
33 if [[ "$?" == "0" ]]; then
34     DOCKER=`which docker.io`
35
36     if [[ "$DOCKER" == "" ]]; then
37       DOCKER=`which docker`
38     fi
39
40     DOCKER=$DOCKER /usr/bin/make -f build_tools/Makefile $*
41 fi