Fix some minor issues in bashbrew.sh

Double quotes and indented heredocs!
This commit is contained in:
Tianon Gravi 2015-02-13 17:14:12 -07:00
parent fafcbfa3f5
commit 24590577c9
1 changed files with 44 additions and 45 deletions

View File

@ -19,17 +19,17 @@ logs="$(readlink -f "$logs")"
self="$(basename "$0")"
usage() {
cat <<EOUSAGE
cat <<-EOUSAGE
usage: $self [build|push|list] [options] [repo[:tag] ...]
usage: $self [build|push|list] [options] [repo[:tag] ...]
ie: $self build --all
$self push debian ubuntu:12.04
$self list --namespaces='_' debian:7 hello-world
This script processes the specified Docker images using the corresponding
repository manifest files.
This script processes the specified Docker images using the corresponding
repository manifest files.
common options:
common options:
--all Build all repositories specified in library
--docker="$docker"
Use a custom Docker binary
@ -50,16 +50,16 @@ common options:
images to use FROM correctly (think "onbuild" variants that
are "FROM base-image:some-version")
build options:
build options:
--no-build Don't build, print what would build
--no-clone Don't pull/clone Git repositories
--src="$src"
Where to store cloned Git repositories (GOPATH style)
push options:
push options:
--no-push Don't push, print what would push
EOUSAGE
EOUSAGE
}
# arg handling
@ -71,7 +71,7 @@ doBuild=1
doPush=1
buildAll=
while true; do
flag=$1
flag="$1"
shift
case "$flag" in
--all) buildAll=1 ;;
@ -97,10 +97,9 @@ done
# which subcommand
subcommand="$1"
shift || { usage >&2 && exit 1; }
case "$subcommand" in
build|push|list)
shift
;;
build|push|list) ;;
*)
{
echo "error: unknown subcommand: $1"