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,7 +19,7 @@ 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
@ -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"