X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5e062b44d6b9ebb70a7b0708436eb463b5e8ae7b..07cba2282dc6e8c701db411e716b8943e2dfa21f:/docker/build.sh diff --git a/docker/build.sh b/docker/build.sh index e990ccd8ed..77aeb1f187 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -1,14 +1,31 @@ #! /bin/bash -# make sure Ruby 1.9.3 is installed before proceeding +# make sure a Ruby version greater than or equal to 1.9.3 is installed before proceeding if ! ruby -e 'exit RUBY_VERSION >= "1.9.3"' 2>/dev/null then - echo "Installing Arvados requires at least Ruby 1.9.3." - echo "You may need to enter your password." - read -p "Press Ctrl-C to abort, or else press ENTER to install ruby1.9.3 and continue. " unused + echo "Building the Arvados docker containers requires at least Ruby 1.9.3." + echo "Please install ruby 1.9.3 or higher before executing this script." + exit 1 +fi + +function usage { + echo >&2 + echo >&2 "usage: $0 [options]" + echo >&2 + echo >&2 "Calling $0 without arguments will build all Arvados docker images" + echo >&2 + echo >&2 "$0 options:" + echo >&2 " -h, --help Print this help text" + echo >&2 " clean Clear all build information" + echo >&2 " realclean clean and remove all Arvados Docker images except arvados/debian" + echo >&2 " deepclean realclean and remove arvados/debian, crosbymichael/skydns and " + echo >&2 " crosbymichael/skydns Docker images" + echo >&2 +} - sudo apt-get update - sudo apt-get -y install ruby1.9.3 +if [ "$1" = '-h' ] || [ "$1" = '--help' ]; then + usage + exit 1 fi build_tools/build.rb