Added context sensitive help for cmd line switches.
This commit is contained in:
parent
31ad03a1d4
commit
0297f33803
1 changed files with 72 additions and 1 deletions
|
@ -33,7 +33,6 @@ declare -r R_arrow=$'\e[1;33m>\e[0m'
|
||||||
declare -r L_arrow=$'\e[1;33m<\e[0m'
|
declare -r L_arrow=$'\e[1;33m<\e[0m'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
'clear'
|
'clear'
|
||||||
cat <<- -EOF-
|
cat <<- -EOF-
|
||||||
|
@ -41,6 +40,78 @@ ${DD_BORDER}
|
||||||
${BOLD}
|
${BOLD}
|
||||||
Usage: $0 ${BOLD}[OPTION]
|
Usage: $0 ${BOLD}[OPTION]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
${BOLD} -h, --help${OFF}
|
||||||
|
print this help, then exit
|
||||||
|
${BOLD} -V, --version${OFF}
|
||||||
|
print version information, then exit
|
||||||
|
${BOLD} -D --directory DIR${OFF}
|
||||||
|
use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces will be
|
||||||
|
in the directory DIR/jhalfs.
|
||||||
|
${BOLD} -R --rebuild${OFF}
|
||||||
|
clean the build directory before to perfom any other task. The directory
|
||||||
|
is cleaned only if it was populated by a previous jhalfs run.
|
||||||
|
${BOLD} -G, --get-packages${OFF}
|
||||||
|
download the packages and patches. This assumes that the server declared in the
|
||||||
|
conf file has the proper packages and patches for the book version being processed.
|
||||||
|
${BOLD} -T, --testsuites N ${OFF}
|
||||||
|
Run test suites [0-3]
|
||||||
|
0 = none
|
||||||
|
1 = only chapter06 Glibc, GCC and Binutils testsuites
|
||||||
|
2 = all chapter06 testsuites
|
||||||
|
3 = all chapter05 and chapter06 testsuites
|
||||||
|
${BOLD} -W, --working-copy DIR${OFF}
|
||||||
|
use the local working copy placed in DIR as the $(echo $PROGNAME | tr [a-z] [A-Z]) book
|
||||||
|
${BOLD} -B, --book VER${OFF}
|
||||||
|
checkout VER version of the LFS book. Supported versions at this time are:
|
||||||
|
dev* | trunk | SVN aliases for Development {C,H,B}LFS
|
||||||
|
alpha* aliases for the LFS alphabetical branch
|
||||||
|
udev* aliases for the LFS udev_update branch
|
||||||
|
${BOLD} -F, --fstab FILE${OFF}
|
||||||
|
use FILE as the /etc/fstab file for the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} system. If not specified,
|
||||||
|
a default /etc/fstab file with dummy values is created.
|
||||||
|
${BOLD} -K, --kernel-config FILE${OFF}
|
||||||
|
use the kernel configuration file specified in FILE to build the kernel.
|
||||||
|
if the file is not found, or if not specified, the kernel build is skipped.
|
||||||
|
${BOLD} -M, --run-make${OFF}
|
||||||
|
run make on the generated Makefile
|
||||||
|
-EOF-
|
||||||
|
|
||||||
|
[[ ${PROGNAME} = "clfs" ]] &&
|
||||||
|
cat <<- -EOF-
|
||||||
|
${BOLD} -A, --arch ARCH ${OFF}
|
||||||
|
Select the TARGET architecture, valid selections are:
|
||||||
|
32bit builds
|
||||||
|
x86, i486, i586, ppc, mips, mipsel, sparc, sparcv8
|
||||||
|
64bit builds
|
||||||
|
x86_64-64, mips64-64, mipsel64-64, sparc64-64, alpha
|
||||||
|
64bit multi-lib
|
||||||
|
x86_64, mips64, mipsel64, sparc64, ppc64
|
||||||
|
${BOLD} --method BUILDMETHOD ${OFF}
|
||||||
|
Select the build method, chroot or boot
|
||||||
|
${BOLD} --boot_config FILE ${OFF}
|
||||||
|
The configuration file for the bootstrap kernel if method=boot
|
||||||
|
-EOF-
|
||||||
|
|
||||||
|
[[ ${PROGNAME} = "hlfs" ]] &&
|
||||||
|
cat <<- -EOF-
|
||||||
|
${BOLD} --model STYLE ${OFF}
|
||||||
|
Select the library model for the HLFS system
|
||||||
|
Valid choices are: glibc or uclibc
|
||||||
|
-EOF-
|
||||||
|
cat <<- -EOF-
|
||||||
|
${DD_BORDER}
|
||||||
|
-EOF-
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
usage2() {
|
||||||
|
'clear'
|
||||||
|
cat <<- -EOF-
|
||||||
|
${DD_BORDER}
|
||||||
|
${BOLD}
|
||||||
|
Usage: $0 ${BOLD}[OPTION]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
${BOLD} -h, --help${OFF}
|
${BOLD} -h, --help${OFF}
|
||||||
print this help, then exit
|
print this help, then exit
|
||||||
|
|
Reference in a new issue