Move subcommand checking down so we can "bashbrew --help" without errors
This commit is contained in:
parent
be008eaf77
commit
e127893b7f
30
bashbrew.sh
30
bashbrew.sh
|
|
@ -53,21 +53,6 @@ push options:
|
|||
EOUSAGE
|
||||
}
|
||||
|
||||
# which subcommand
|
||||
subcommand="$1"
|
||||
case "$subcommand" in
|
||||
build|push)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
{
|
||||
echo "error: unknown subcommand: $1"
|
||||
usage
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# arg handling
|
||||
opts="$(getopt -o 'h?' --long 'all,docker:,help,library:,logs:,namespaces:,no-build,no-clone,no-push,src:' -- "$@" || { usage >&2 && false; })"
|
||||
eval set -- "$opts"
|
||||
|
|
@ -101,6 +86,21 @@ while true; do
|
|||
esac
|
||||
done
|
||||
|
||||
# which subcommand
|
||||
subcommand="$1"
|
||||
case "$subcommand" in
|
||||
build|push)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
{
|
||||
echo "error: unknown subcommand: $1"
|
||||
usage
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
repos=()
|
||||
if [ "$buildAll" ]; then
|
||||
repos=( "$library"/!(MAINTAINERS) )
|
||||
|
|
|
|||
Loading…
Reference in New Issue