Fix some minor issues in bashbrew.sh
Double quotes and indented heredocs!
This commit is contained in:
parent
fafcbfa3f5
commit
24590577c9
23
bashbrew.sh
23
bashbrew.sh
|
|
@ -19,17 +19,17 @@ logs="$(readlink -f "$logs")"
|
||||||
self="$(basename "$0")"
|
self="$(basename "$0")"
|
||||||
|
|
||||||
usage() {
|
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
|
ie: $self build --all
|
||||||
$self push debian ubuntu:12.04
|
$self push debian ubuntu:12.04
|
||||||
$self list --namespaces='_' debian:7 hello-world
|
$self list --namespaces='_' debian:7 hello-world
|
||||||
|
|
||||||
This script processes the specified Docker images using the corresponding
|
This script processes the specified Docker images using the corresponding
|
||||||
repository manifest files.
|
repository manifest files.
|
||||||
|
|
||||||
common options:
|
common options:
|
||||||
--all Build all repositories specified in library
|
--all Build all repositories specified in library
|
||||||
--docker="$docker"
|
--docker="$docker"
|
||||||
Use a custom Docker binary
|
Use a custom Docker binary
|
||||||
|
|
@ -50,16 +50,16 @@ common options:
|
||||||
images to use FROM correctly (think "onbuild" variants that
|
images to use FROM correctly (think "onbuild" variants that
|
||||||
are "FROM base-image:some-version")
|
are "FROM base-image:some-version")
|
||||||
|
|
||||||
build options:
|
build options:
|
||||||
--no-build Don't build, print what would build
|
--no-build Don't build, print what would build
|
||||||
--no-clone Don't pull/clone Git repositories
|
--no-clone Don't pull/clone Git repositories
|
||||||
--src="$src"
|
--src="$src"
|
||||||
Where to store cloned Git repositories (GOPATH style)
|
Where to store cloned Git repositories (GOPATH style)
|
||||||
|
|
||||||
push options:
|
push options:
|
||||||
--no-push Don't push, print what would push
|
--no-push Don't push, print what would push
|
||||||
|
|
||||||
EOUSAGE
|
EOUSAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
# arg handling
|
# arg handling
|
||||||
|
|
@ -71,7 +71,7 @@ doBuild=1
|
||||||
doPush=1
|
doPush=1
|
||||||
buildAll=
|
buildAll=
|
||||||
while true; do
|
while true; do
|
||||||
flag=$1
|
flag="$1"
|
||||||
shift
|
shift
|
||||||
case "$flag" in
|
case "$flag" in
|
||||||
--all) buildAll=1 ;;
|
--all) buildAll=1 ;;
|
||||||
|
|
@ -97,10 +97,9 @@ done
|
||||||
|
|
||||||
# which subcommand
|
# which subcommand
|
||||||
subcommand="$1"
|
subcommand="$1"
|
||||||
|
shift || { usage >&2 && exit 1; }
|
||||||
case "$subcommand" in
|
case "$subcommand" in
|
||||||
build|push|list)
|
build|push|list) ;;
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
{
|
{
|
||||||
echo "error: unknown subcommand: $1"
|
echo "error: unknown subcommand: $1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue