From 386aae039eaa8007dace4328b0dfd132256a79a5 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Tue, 22 Jul 2014 21:42:03 -0400 Subject: [PATCH] * add argument help to build.sh * fix clean/realclean/deepclean invocation syntax in documentation refs #3219 --- .../install-docker.html.textile.liquid | 12 +++++------ docker/build.sh | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/doc/install/install-docker.html.textile.liquid b/doc/install/install-docker.html.textile.liquid index 091d861680..4c70f7da4a 100644 --- a/doc/install/install-docker.html.textile.liquid +++ b/doc/install/install-docker.html.textile.liquid @@ -84,22 +84,22 @@ crosbymichael/skydns latest 1923ce648d4c 5 months ago h2. Updating the Arvados Docker containers -If there has been an update to the Arvados Docker building code, it is safest to rebuild the Arvados Docker images from scratch. All build information can be cleared with the '--clean' option to build.sh: +If there has been an update to the Arvados Docker building code, it is safest to rebuild the Arvados Docker images from scratch. All build information can be cleared with the 'clean' option to build.sh: -
~$ ./build.sh --clean
+
~$ ./build.sh clean
-You can also use '--realclean', which does what '--clean' does and in addition removes all Arvados Docker containers and images from your system, with the exception of the arvados/debian image. +You can also use 'realclean', which does what 'clean' does and in addition removes all Arvados Docker containers and images from your system, with the exception of the arvados/debian image. -
~$ ./build.sh --realclean
+
~$ ./build.sh realclean
-Finally, the '--deepclean' option does what '--realclean' does, and also removes the arvados/debian, crosbymichael/skydns and crosbymichael/skydock images. +Finally, the 'deepclean' option does what 'realclean' does, and also removes the arvados/debian, crosbymichael/skydns and crosbymichael/skydock images. -
~$ ./build.sh --deepclean
+
~$ ./build.sh deepclean
h2. Running the Arvados Docker containers diff --git a/docker/build.sh b/docker/build.sh index e990ccd8ed..c9fbf05ff6 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -11,6 +11,26 @@ then sudo apt-get -y install ruby1.9.3 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 +} + +if [ "$1" = '-h' ] || [ "$1" = '--help' ]; then + usage + exit 1 +fi + build_tools/build.rb if [[ "$?" == "0" ]]; then -- 2.30.2