setup_board: cleanup flags section

Move most flags into the usage message and use a more consistent style.
This commit is contained in:
Michael Marineau 2016-02-03 17:16:28 -08:00
parent b3a64cc7c4
commit 5a42bd8565

View File

@ -13,14 +13,26 @@ restart_in_chroot_if_needed "$@"
assert_not_root_user assert_not_root_user
# Developer-visible flags. # Developer-visible flags.
DEFINE_string board "$DEFAULT_BOARD" \ DEFINE_string board "${DEFAULT_BOARD}" \
"The name of the board to set up." "The name of the board to set up."
DEFINE_boolean default $FLAGS_FALSE \ DEFINE_boolean default "${FLAGS_FALSE}" \
"Set board to the default board in your chroot" "Set board to the default board in your chroot"
DEFINE_boolean force $FLAGS_FALSE \ DEFINE_boolean force "${FLAGS_FALSE}" \
"Force re-creating board root." "Force re-creating board root."
DEFINE_boolean usepkg $FLAGS_TRUE \ DEFINE_boolean usepkg "${FLAGS_TRUE}" \
"Use binary packages to bootstrap." "Use binary packages when possible."
DEFINE_boolean getbinpkg "${FLAGS_TRUE}" \
"Download binary packages from remote repository."
DEFINE_string getbinpkgver "" \
"Use binary packages from a specific version."
DEFINE_boolean toolchainpkgonly "${FLAGS_FALSE}" \
"Use binary packages only for the board toolchain."
DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum."
DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \
"Don't update toolchain automatically."
DEFINE_boolean skip_chroot_upgrade "${FLAGS_FALSE}" \
"Don't run the chroot upgrade automatically; use with care."
FLAGS_HELP="usage: $(basename $0) [flags] FLAGS_HELP="usage: $(basename $0) [flags]
@ -33,26 +45,14 @@ show_help_if_requested "$@"
# The following options are advanced options, only available to those willing # The following options are advanced options, only available to those willing
# to read the source code. They are not shown in help output, since they are # to read the source code. They are not shown in help output, since they are
# not needed for the typical developer workflow. # not needed for the typical developer workflow.
DEFINE_string getbinpkgver "" \
"Use binary packages from a specific version."
DEFINE_boolean toolchainpkgonly $FLAGS_FALSE \
"Use binary packages only for the board toolchain."
DEFINE_integer jobs "${NUM_JOBS}" \
"How many packages to build in parallel at maximum."
DEFINE_string libc_version "[stable]" \ DEFINE_string libc_version "[stable]" \
"Version of libc to use." "Version of libc to use."
DEFINE_boolean quiet $FLAGS_FALSE \ DEFINE_boolean quiet $FLAGS_FALSE \
"Don't print warnings when board already exists." "Don't print warnings when board already exists."
DEFINE_boolean skip_toolchain_update $FLAGS_FALSE \
"Don't update toolchain automatically."
DEFINE_boolean skip_chroot_upgrade $FLAGS_FALSE \
"Don't run the chroot upgrade automatically; use with care."
DEFINE_string variant "" \ DEFINE_string variant "" \
"Board variant." "Board variant."
DEFINE_boolean regen_configs ${FLAGS_FALSE} \ DEFINE_boolean regen_configs ${FLAGS_FALSE} \
"Regenerate all config files (useful for modifying profiles w/out rebuild)." "Regenerate all config files (useful for modifying profiles w/out rebuild)."
DEFINE_boolean getbinpkg $FLAGS_TRUE \
"Passed to update_chroot, ignored by setup_board itself."
# builds wrappers like equery-arm-generic. # builds wrappers like equery-arm-generic.