download_and_compile.sh: simplify the definition of _usage()

This commit is contained in:
Florent Rougon 2022-12-15 20:49:41 +01:00
parent 5e71ae60fe
commit aa17379ae0

View File

@ -843,86 +843,86 @@ function _printVersion(){
}
function _usage() {
echo "$PROGNAME [OPTION...] [--] [COMPONENT...]"
echo "Download and compile components belonging to the FlightGear ecosystem."
echo
echo "Without any COMPONENT listed, or if ALL is specified, recompile all"
echo "components listed in the WHATTOBUILDALL variable. Each COMPONENT may"
echo "be one of the following words:"
echo
echo " ALL, $(_joinBy ', ' "${WHATTOBUILD_AVAIL[@]}")."
echo
echo "Available options:"
echo " -h, --help show this help message and exit"
echo " --version print version and license information, then exit"
echo " -e compile FlightGear with --with-eventinput option (experimental)"
echo " -i compile SimGear and FlightGear with -D ENABLE_RTI=ON option (experimental)"
echo " -b RELEASE_TYPE default=RelWithDebInfo"
echo " set build type to RELEASE_TYPE (Release|RelWithDebInfo|Debug)"
echo " -a y|n y=run 'PACKAGE_MANAGER update', n=don't default=y"
echo " (PACKAGE_MANAGER being a program like 'apt-get', see below)"
echo " -p y|n y=install packages using PACKAGE_MANAGER, n=don't default=y"
echo " -c y|n y=compile programs, n=don't default=y"
echo " -d y|n y=fetch programs from the Internet (Git, svn, etc.), n=don't default=y"
echo " --cleanup Remove all build and installation directories. Try this if a"
echo ' compilation fails and the "base directory" was not "fresh" when'
echo " you started ${PROGNAME}. If this option is given and no"
echo " component has been specified on the command line, then only the"
echo " cleanup routine is run."
echo " --git-clone-default-proto=PROTO default=https"
echo " default protocol to use for 'git clone' (https, git or ssh)"
echo " --git-clone-site-params=SITE=PROTOCOL[:USERNAME]"
echo " use PROTOCOL as USERNAME when cloning a Git repository located"
echo " at SITE (sample sites: 'sourceforge', 'github'; valid"
echo " protocols: 'ssh', 'https', 'git'; USERNAME is required when"
echo " using 'ssh'). You may pass this option several times with"
echo " different sites."
echo " --package-manager=PACKAGE_MANAGER default=apt-get"
echo " program used to install packages; must be compatible with"
echo " 'apt-get' for the operations performed by $PROGNAME."
echo " --sudo=SUDO_PROGRAM default=sudo"
echo " program used to run PACKAGE_MANAGER with appropriate rights"
echo " (pass an empty value to run the package manager directly)."
echo " Passing 'echo' as the SUDO_PROGRAM can be useful to see what"
echo " would be done with the package manager without actually running"
echo " the commands."
echo " -j X pass -jX to the Make program"
echo " -O X pass -OX to the Make program"
echo " -r y|n y=reconfigure programs before compiling them, n=don't reconfigure default=y"
echo " --ignore-intercomponent-deps"
echo " Ignore dependencies between components (default: don't)."
echo " Example: TERRAGEAR depends on SIMGEAR. Passing the option can be"
echo " useful if you want to update, rebuild, etc. TERRAGEAR without"
echo " doing the same for SIMGEAR (e.g., if doing repeated TERRAGEAR"
echo " builds and you know your SIMGEAR is already fine and up-to-date)."
echo " --lts compile the latest Long Term Stable release of FlightGear (and"
echo " corresponding versions for other components)"
echo " --old-lts compile the previous Long Term Stable release of FlightGear (and"
echo " corresponding versions for other components)"
echo " -s compile the latest stable release of FlightGear (and"
echo " corresponding versions of the other components)"
echo " --component-branch=COMPONENT=BRANCH"
echo " Override the default branch for COMPONENT. For the specified"
echo " component, this overrides the effect of options -s, --lts and"
echo " --old-lts. This option may be given several times."
echo " --sg-cmake-arg=ARGUMENT"
echo " Pass ARGUMENT to CMake when building SimGear."
echo " This option may be given several times."
echo " --fg-cmake-arg=ARGUMENT"
echo " Pass ARGUMENT to CMake when building FlightGear."
echo " This option may be given several times."
echo " --compositor"
echo " build FlightGear with compositor enabled"
echo " --non-interactive"
echo " don't ask any question; always assume the default answer in"
echo " situations where a question would normally be asked."
echo
echo "More detailed information can be found on the FlightGear wiki:"
echo ""
echo " http://wiki.flightgear.org/Scripted_Compilation_on_Linux_Debian/Ubuntu"
echo ""
echo "The wiki may sometimes be a bit outdated; if in doubt, consider this help text"
echo "as the reference."
echo "$PROGNAME [OPTION...] [--] [COMPONENT...]
Download and compile components belonging to the FlightGear ecosystem.
Without any COMPONENT listed, or if ALL is specified, recompile all
components listed in the WHATTOBUILDALL variable. Each COMPONENT may
be one of the following words:
ALL, $(_joinBy ', ' "${WHATTOBUILD_AVAIL[@]}").
Available options:
-h, --help show this help message and exit
--version print version and license information, then exit
-e compile FlightGear with --with-eventinput option (experimental)
-i compile SimGear and FlightGear with -D ENABLE_RTI=ON option (experimental)
-b RELEASE_TYPE default=RelWithDebInfo
set build type to RELEASE_TYPE (Release|RelWithDebInfo|Debug)
-a y|n y=run 'PACKAGE_MANAGER update', n=don't default=y
(PACKAGE_MANAGER being a program like 'apt-get', see below)
-p y|n y=install packages using PACKAGE_MANAGER, n=don't default=y
-c y|n y=compile programs, n=don't default=y
-d y|n y=fetch programs from the Internet (Git, svn, etc.), n=don't default=y
--cleanup Remove all build and installation directories. Try this if a
compilation fails and the \"base directory\" was not \"fresh\" when
you started ${PROGNAME}. If this option is given and no
component has been specified on the command line, then only the
cleanup routine is run.
--git-clone-default-proto=PROTO default=https
default protocol to use for 'git clone' (https, git or ssh)
--git-clone-site-params=SITE=PROTOCOL[:USERNAME]
use PROTOCOL as USERNAME when cloning a Git repository located
at SITE (sample sites: 'sourceforge', 'github'; valid
protocols: 'ssh', 'https', 'git'; USERNAME is required when
using 'ssh'). You may pass this option several times with
different sites.
--package-manager=PACKAGE_MANAGER default=apt-get
program used to install packages; must be compatible with
'apt-get' for the operations performed by $PROGNAME.
--sudo=SUDO_PROGRAM default=sudo
program used to run PACKAGE_MANAGER with appropriate rights
(pass an empty value to run the package manager directly).
Passing 'echo' as the SUDO_PROGRAM can be useful to see what
would be done with the package manager without actually running
the commands.
-j X pass -jX to the Make program
-O X pass -OX to the Make program
-r y|n y=reconfigure programs before compiling them, n=don't reconfigure default=y
--ignore-intercomponent-deps
Ignore dependencies between components (default: don't).
Example: TERRAGEAR depends on SIMGEAR. Passing the option can be
useful if you want to update, rebuild, etc. TERRAGEAR without
doing the same for SIMGEAR (e.g., if doing repeated TERRAGEAR
builds and you know your SIMGEAR is already fine and up-to-date).
--lts compile the latest Long Term Stable release of FlightGear (and
corresponding versions for other components)
--old-lts compile the previous Long Term Stable release of FlightGear (and
corresponding versions for other components)
-s compile the latest stable release of FlightGear (and
corresponding versions of the other components)
--component-branch=COMPONENT=BRANCH
Override the default branch for COMPONENT. For the specified
component, this overrides the effect of options -s, --lts and
--old-lts. This option may be given several times.
--sg-cmake-arg=ARGUMENT
Pass ARGUMENT to CMake when building SimGear.
This option may be given several times.
--fg-cmake-arg=ARGUMENT
Pass ARGUMENT to CMake when building FlightGear.
This option may be given several times.
--compositor
build FlightGear with compositor enabled
--non-interactive
don't ask any question; always assume the default answer in
situations where a question would normally be asked.
More detailed information can be found on the FlightGear wiki:
http://wiki.flightgear.org/Scripted_Compilation_on_Linux_Debian/Ubuntu
The wiki may sometimes be a bit outdated; if in doubt, consider this help text
as the reference."
}
#######################################################