* add argument help to build.sh
authorWard Vandewege <ward@curoverse.com>
Wed, 23 Jul 2014 01:42:03 +0000 (21:42 -0400)
committerWard Vandewege <ward@curoverse.com>
Wed, 23 Jul 2014 01:42:03 +0000 (21:42 -0400)
* fix clean/realclean/deepclean invocation syntax in documentation

refs #3219

doc/install/install-docker.html.textile.liquid
docker/build.sh

index 091d8616809de680cf133e172bbcad53f6021e53..4c70f7da4aafa51fa5ada186199bbc92d6df6f36 100644 (file)
@@ -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:
 
 <notextile>
-<pre><code>~$ <span class="userinput">./build.sh --clean</span></code></pre>
+<pre><code>~$ <span class="userinput">./build.sh clean</span></code></pre>
 </notextile>
 
-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.
 
 <notextile>
-<pre><code>~$ <span class="userinput">./build.sh --realclean</span></code></pre>
+<pre><code>~$ <span class="userinput">./build.sh realclean</span></code></pre>
 </notextile>
 
-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.
 
 <notextile>
-<pre><code>~$ <span class="userinput">./build.sh --deepclean</span></code></pre>
+<pre><code>~$ <span class="userinput">./build.sh deepclean</span></code></pre>
 </notextile>
 
 h2. Running the Arvados Docker containers
index e990ccd8ede461af400ddcdb6cdc28e41a70efa1..c9fbf05ff64570c2d7be6e51399f952a242469ec 100755 (executable)
@@ -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