Adding farce to config options.
This commit is contained in:
parent
e65a92f662
commit
46124598cd
4 changed files with 46 additions and 15 deletions
|
@ -76,8 +76,14 @@ ${BOLD} -W, --working-copy DIR${OFF}
|
|||
[[ ${PROGNAME} != "blfs" ]] &&
|
||||
cat <<- -EOF-
|
||||
|
||||
${BOLD} --do-ICA${OFF}
|
||||
do the Iterative Comparison Analysis. That will take several time.
|
||||
${BOLD} -C, --comparasion TYPE${OFF}
|
||||
do iterative comparison analysis. That will take several time due that
|
||||
the final system packages wil be rebuilded the times defined in the
|
||||
ITERATIONS config option.
|
||||
Analisys types allowed are:
|
||||
ICA = do the ICA analisys designed by Greg Schafer
|
||||
farce = do the farce analisys designed by Ken Moffat
|
||||
both = perfom both ICA and farce analisys
|
||||
|
||||
${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,
|
||||
|
|
|
@ -58,16 +58,22 @@ LC_ALL=$LC_ALL # (not used in LFS)
|
|||
# Not used in LFS
|
||||
KEYMAP=none
|
||||
|
||||
#=== Variables needed by ICA ===
|
||||
#--- Run ICA testing 0/1 0(no)/1(yes)
|
||||
RUN_ICA=0
|
||||
|
||||
#=== Variables needed by iterative comparison analysis ===
|
||||
#--- The number of final stage builds to create and compare, min. 2, max. 5
|
||||
ITERATIONS=3
|
||||
|
||||
#--- Run ICA testing 0/1 0(no)/1(yes)
|
||||
RUN_ICA=0
|
||||
|
||||
#--- ICA report log directory
|
||||
ICALOGDIR=$JHALFSDIR/logs/ICA
|
||||
|
||||
#--- Run farce testing 0/1 0(no)/1(yes)
|
||||
RUN_FARCE=0
|
||||
|
||||
#--- farce report log directory
|
||||
FARCELOGDIR=$JHALFSDIR/logs/farce
|
||||
|
||||
#==== INTERNAL VARIABLES ====
|
||||
# Don't edit it unless you know what you are doing
|
||||
|
||||
|
|
|
@ -80,15 +80,15 @@ validate_config() { # Are the config values sane (within reason)
|
|||
PROGNAME (lfs,clfs,hlfs,blfs)
|
||||
modifies: none
|
||||
returns: nothing
|
||||
on error: write text to console and dies
|
||||
on error: write text to console and dies
|
||||
on success: write text to console and returns
|
||||
inline_doc
|
||||
|
||||
# First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
|
||||
local -r blfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG DEPEND TEST"
|
||||
local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE MODEL GRSECURITY_HOST TEST RUN_ICA ITERATIONS STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL"
|
||||
local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE METHOD ARCH TARGET TEST RUN_ICA ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"
|
||||
local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE TEST RUN_ICA ITERATIONS STRIP FSTAB CONFIG VIMLANG PAGE TIMEZONE LANG"
|
||||
local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE MODEL GRSECURITY_HOST TEST RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG KEYMAP PAGE TIMEZONE LANG LC_ALL"
|
||||
local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE METHOD ARCH TARGET TEST RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG KEYMAP VIMLANG PAGE TIMEZONE LANG"
|
||||
local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE HPKG RUNMAKE TEST RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG 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_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
|
||||
|
@ -133,6 +133,7 @@ inline_doc
|
|||
HPKG) validation_str="x0x x1x"; validate_str; continue ;;
|
||||
RUNMAKE) validation_str="x0x x1x"; validate_str; continue ;;
|
||||
RUN_ICA) validation_str="x0x x1x"; validate_str; continue ;;
|
||||
RUN_FARCE) validation_str="x0x x1x"; validate_str; continue ;;
|
||||
ITERATIONS) validation_str="x2x x3x x4x x5x"; validate_str; continue ;;
|
||||
TEST) validation_str="x0x x1x x2x x3x"; validate_str; continue ;;
|
||||
STRIP) validation_str="x0x x1x"; validate_str; continue ;;
|
||||
|
@ -186,7 +187,7 @@ inline_doc
|
|||
if [ ! -z ${SRC_ARCHIVE} ]; then
|
||||
if [ ! -d ${SRC_ARCHIVE} ]; then
|
||||
echo " -- is NOT a directory"
|
||||
write_error_and_die
|
||||
write_error_and_die
|
||||
fi
|
||||
if [ ! -w ${SRC_ARCHIVE} ]; then
|
||||
echo -n "${nl_} [${BOLD}${YELLOW}WARN$OFF] You do not have <write> access to this directory, ${nl_}${tab_}downloaded files can not be saved in this archive"
|
||||
|
|
26
master.sh
26
master.sh
|
@ -96,7 +96,7 @@ source $COMMON_DIR/func_validate_configs.sh
|
|||
|
||||
|
||||
###################################
|
||||
### MAIN ###
|
||||
### MAIN ###
|
||||
###################################
|
||||
|
||||
# Evaluate any command line switches
|
||||
|
@ -214,7 +214,24 @@ while test $# -gt 0 ; do
|
|||
;;
|
||||
|
||||
# Common options for LFS, CLFS and HLFS
|
||||
--do-ICA ) RUN_ICA=1 ;;
|
||||
--comparasion | -C )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
case $PROGNAME in
|
||||
ICA) RUN_ICA=1
|
||||
RUN_FARCE=0
|
||||
;;
|
||||
farce) RUN_ICA=0
|
||||
RUN_FARCE=1
|
||||
;;
|
||||
both) RUN_ICA=1
|
||||
RUN_FARCE=1
|
||||
*)
|
||||
echo -e "\n$1 is an unknown analisys method."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
--fstab | -F )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
|
@ -461,8 +478,9 @@ fi
|
|||
|
||||
if [[ "$PWD" != "$JHALFSDIR" ]]; then
|
||||
cp $COMMON_DIR/makefile-functions $JHALFSDIR/
|
||||
if [[ "$RUN_ICA" != "0" ]]; then
|
||||
cp $COMMON_DIR/do_ica_{prep,work} $JHALFSDIR/
|
||||
if [[ "$RUN_ICA" = "1" ]] || [[ "$RUN_FARCE" = "1" ]]; then
|
||||
mkdir $JHALFSDIR/extras
|
||||
cp extras/* $JHALFSDIR/extras
|
||||
fi
|
||||
if [[ -n "$FILES" ]]; then
|
||||
# pushd/popd necessary to deal with mulitiple files
|
||||
|
|
Reference in a new issue