Allow to download the kernel package and patches even if no config file is supplied.
This commit is contained in:
parent
d3b8635fe6
commit
294c937163
5 changed files with 20 additions and 4 deletions
|
@ -49,6 +49,10 @@ CONFIG=
|
||||||
# NOTE: this setting is required
|
# NOTE: this setting is required
|
||||||
BOOT_CONFIG=
|
BOOT_CONFIG=
|
||||||
|
|
||||||
|
# Get the kernel package and patches even if no configutation file
|
||||||
|
# has been supplied? 0(no)/1(yes)
|
||||||
|
GETKERNEL=0
|
||||||
|
|
||||||
#--- Book's sources directory
|
#--- Book's sources directory
|
||||||
# If you have previously checked out the book from the repository
|
# If you have previously checked out the book from the repository
|
||||||
BOOK=
|
BOOK=
|
||||||
|
|
|
@ -19,6 +19,10 @@ FSTAB=
|
||||||
# If no config file is specified the kernel is NOT compiled
|
# If no config file is specified the kernel is NOT compiled
|
||||||
CONFIG=
|
CONFIG=
|
||||||
|
|
||||||
|
# Get the kernel package and patches even if no configutation file
|
||||||
|
# has been supplied? 0(no)/1(yes)
|
||||||
|
GETKERNEL=0
|
||||||
|
|
||||||
#--- Book's sources directory
|
#--- Book's sources directory
|
||||||
# If you have previously checked out the book from the repository
|
# If you have previously checked out the book from the repository
|
||||||
BOOK=
|
BOOK=
|
||||||
|
|
|
@ -13,6 +13,10 @@ FSTAB=
|
||||||
# If no config file is specified the kernel is NOT compiled
|
# If no config file is specified the kernel is NOT compiled
|
||||||
CONFIG=
|
CONFIG=
|
||||||
|
|
||||||
|
# Get the kernel package and patches even if no configutation file
|
||||||
|
# has been supplied? 0(no)/1(yes)
|
||||||
|
GETKERNEL=0
|
||||||
|
|
||||||
#--- Book's sources directory
|
#--- Book's sources directory
|
||||||
# If you have previously checked out the book from the repository
|
# If you have previously checked out the book from the repository
|
||||||
BOOK=
|
BOOK=
|
||||||
|
|
|
@ -624,7 +624,8 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
|
||||||
[[ "$VIMLANG" = "0" ]] && continue
|
[[ "$VIMLANG" = "0" ]] && continue
|
||||||
;;
|
;;
|
||||||
*linux/linux-* )
|
*linux/linux-* )
|
||||||
[[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && continue
|
[[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && \
|
||||||
|
[[ "$GETKERNEL" = "0" ]] && continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -84,9 +84,9 @@ validate_config() { # Are the config values sane (within reason)
|
||||||
inline_doc
|
inline_doc
|
||||||
|
|
||||||
# First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
|
# First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
|
||||||
local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL"
|
local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL"
|
||||||
local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"
|
local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
|
||||||
local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG"
|
local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG"
|
||||||
|
|
||||||
local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
|
local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
|
||||||
local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
|
local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
|
||||||
|
@ -172,6 +172,9 @@ inline_doc
|
||||||
|
|
||||||
# Validate general parameters..
|
# Validate general parameters..
|
||||||
GETPKG) validate_against_str "x0x x1x" ;;
|
GETPKG) validate_against_str "x0x x1x" ;;
|
||||||
|
GETKERNEL ) if [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] ; then
|
||||||
|
[[ "$GETPKG" = "1" ]] && validate_against_str "x0x x1x"
|
||||||
|
fi ;;
|
||||||
RUNMAKE) validate_against_str "x0x x1x" ;;
|
RUNMAKE) validate_against_str "x0x x1x" ;;
|
||||||
REPORT) validate_against_str "x0x x1x"
|
REPORT) validate_against_str "x0x x1x"
|
||||||
if [[ "${!config_param}" = "1" ]]; then
|
if [[ "${!config_param}" = "1" ]]; then
|
||||||
|
|
Reference in a new issue