Changeset 4da2512
- Timestamp:
- 08/29/2006 06:16:27 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 4965fa8
- Parents:
- 3619bc5
- Files:
-
- 1 added
- 10 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Config.in
r3619bc5 r4da2512 27 27 endchoice 28 28 29 config PROGNAME 30 string 31 default "lfs" if BOOK_LFS 32 default "clfs" if BOOK_CLFS 33 default "clfs2" if BOOK_CLFS2 34 # default "clfs3" if BOOK_CLFS3 35 default "hlfs" if BOOK_HLFS 36 default "blfs" if BOOK_BLFS 37 29 38 config RUN_ME 30 39 string 31 default "./lfs" if BOOK_LFS 32 default "./clfs" if BOOK_CLFS 33 default "./clfs2" if BOOK_CLFS2 34 # default "./clfs3" if BOOK_CLFS3 35 default "./hlfs" if BOOK_HLFS 36 default "./blfs" if BOOK_BLFS 40 default "./jhalfs run" if !BOOK_BLFS 41 default "./blfs-tool" if BOOK_BLFS 37 42 #--- End BOOK/script 38 43 … … 387 392 # if the user has the right priviledges. 388 393 394 config SERVER 395 string "FTP mirror" 396 default "ftp://ftp.lfs-matrix.net" 397 depends GETPKG 398 help 399 #-- FTP mirror to download packages and patches if not found 400 # in $SRC_ARCHIVE 401 # As a last resort, the files will dowloaded from upstream, 402 # if possible. 403 389 404 config GETKERNEL 390 405 bool "Always retrieve kernel package" … … 628 643 #--- End ICA/farce 629 644 630 #-- Optimizations645 #--- Optimizations 631 646 config CONFIG_OPTIMIZE 632 bool "Use optimization "647 bool "Use optimization (see help)" 633 648 default n 634 649 help … … 664 679 #--- End Optimizations 665 680 681 #-- Internal Settings 682 menu "--- Internal Settings (WARNING: for jhalfs developers only)" 683 684 config SCRIPT_ROOT 685 string "Scripts root" 686 default "jhalfs" 687 688 config JHALFSDIR 689 string "jhalfs directory" 690 default "$BUILDDIR/$SCRIPT_ROOT" 691 692 config LOGDIR 693 string "Build logs directory" 694 default "$JHALFSDIR/logs" 695 696 config TESTLOGDIR 697 string "Test suites logs directory" 698 default "$JHALFSDIR/test-logs" 699 700 config ICALOGDIR 701 string "ICA logs directory" 702 default "$LOGDIR/ICA" 703 704 config FARCELOGDIR 705 string "farce logs directory" 706 default "$LOGDIR/farce" 707 708 config MKFILE 709 string "Makefile" 710 default "$JHALFSDIR/Makefile" 711 712 config XSL 713 string "XSL stylesheet" 714 default "$PROGNAME.xsl" 715 716 config PKG_LST 717 string "Package contents list" 718 default "unpacked" 719 720 #--- End Internal Settings 721 endmenu 722 666 723 #--- End Advanced Features 667 724 endmenu 668 669 # config CONFIG_BLFS_CMDS670 # bool "Add BLFS packages to current build"671 # default n672 # depends !BOOK_HLFS && XXX673 # help674 # #--- Select this option if you wish to install any BLFS packages675 # # as part of your {c,h}lfs build.676 # # Any needed packages will be downloaded to the /sources dir677 # config BLFS_CMDLINE678 # string "BLFS packages"679 # default "none"680 # depends CONFIG_BLFS_CMDS -
Makefile
r3619bc5 r4da2512 8 8 9 9 all: menuconfig 10 @clear 11 @touch using_menuconfig 12 @`grep RUN_ME configuration | sed -e 's@RUN_ME=\"@@' -e 's@\"@@' ` || rm -f using_menuconfig 13 @rm -f using_menuconfig 14 10 # @clear 11 @`grep RUN_ME configuration | sed -e 's@RUN_ME=\"@@' -e 's@\"@@' ` 15 12 16 13 $(CONFIG)/conf: -
blfs-tool
r3619bc5 r4da2512 45 45 46 46 see_ya() { 47 echo -e "\n${L_arrow}${BOLD}jhalfs ${R_arrow} exit${OFF}\n"47 echo -e "\n${L_arrow}${BOLD}jhalfs-X${R_arrow} exit${OFF}\n" 48 48 } 49 49 ##### Simple error TRAPS … … 65 65 66 66 # envars not sourced from configuration file 67 PROGNAME=$(basename $0)68 67 COMMON_DIR="common" 69 68 VERBOSITY=1 70 69 71 70 [[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..." -
common/common-functions
r3619bc5 r4da2512 3 3 # $Id$ 4 4 5 set +e 6 7 # VT100 colors 8 declare -r BLACK=$'\e[1;30m' 9 declare -r DK_GRAY=$'\e[0;30m' 10 11 declare -r RED=$'\e[31m' 12 declare -r GREEN=$'\e[32m' 13 declare -r YELLOW=$'\e[33m' 14 declare -r BLUE=$'\e[34m' 15 declare -r MAGENTA=$'\e[35m' 16 declare -r CYAN=$'\e[36m' 17 declare -r WHITE=$'\e[37m' 18 19 declare -r OFF=$'\e[0m' 20 declare -r BOLD=$'\e[1m' 21 declare -r REVERSE=$'\e[7m' 22 declare -r HIDDEN=$'\e[8m' 23 24 declare -r tab_=$'\t' 25 declare -r nl_=$'\n' 26 27 declare -r DD_BORDER="${BOLD}==============================================================================${OFF}" 28 declare -r SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}" 29 declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}" 30 31 # bold yellow > < pair 32 declare -r R_arrow=$'\e[1;33m>\e[0m' 33 declare -r L_arrow=$'\e[1;33m<\e[0m' 34 35 36 usage() { 37 cat <<- -EOF- 38 ${DD_BORDER} 39 ${BOLD} 40 Usage: $0 ${BOLD}[OPTION] 41 42 ${RED}IMPORTANT:${OFF} Only supported command line switches are listed here. 43 For more fine-grained setups you must edit the relevant 44 configuration files placed under ${BOLD}common/${OFF} and ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])/${OFF} 45 46 Options: 47 ${BOLD} -h, --help${OFF} 48 print this help, then exit 49 50 ${BOLD} -V, --version${OFF} 51 print version information, then exit 52 53 ${BOLD} -B, --book VER${OFF} 54 use VER version of the book as the system to build. 55 Supported VER values are: 56 dev*, trunk, SVN = aliases for the Development version of {C,H}LFS 57 branch-NAME = a branch of name NAME 58 VERSION = the version of a stable released book 59 To know what branches and stable books work with this version of jhalfs 60 please see http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks 61 62 ${BOLD} -D --directory DIR${OFF} 63 use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces 64 will be in the directory DIR/${SCRIPT_ROOT}. 65 The current setting for BUILDDIR is "$BUILDDIR" 66 67 ${BOLD} -G, --get-packages${OFF} 68 download the packages and patches. This assumes that the server declared 69 in the configuration file has the proper packages and patches for the 70 book version being processed. 71 72 ${BOLD} -O, --optimize${OFF} 73 Optimize [0-2] 74 0 = no optimization 75 1 = optimize final system only 76 2 = optimize both temporary tools and final system 77 Edit common/opt_config{,.d/*} and common/opt_override as desired. 78 79 ${BOLD} -T, --testsuites N ${OFF} 80 Run test suites [0-3] 81 0 = none 82 1 = only final system Glibc, GCC and Binutils testsuites 83 2 = all final system testsuites 84 3 = all temporary tools and final system testsuites 85 In CLFS and HLFS, 3 is an alias to 2 86 87 ${BOLD} -W, --working-copy DIR${OFF} 88 use the local working copy placed in DIR as the $(echo $PROGNAME | tr [a-z] [A-Z]) book 89 90 ${BOLD} -C, --comparison TYPE${OFF} 91 do iterative comparison analysis. This extends the total build time 92 considerably because the entire final system will rebuild itself 93 the number of times specified by ITERATIONS in common/config. 94 Types allowed are: 95 ICA = do ICA as designed by Greg Schafer 96 farce = do the farce analysis designed by Ken Moffat 97 both = perform both ICA and farce analysis 98 99 ${BOLD} -F, --fstab FILE${OFF} 100 use FILE as the /etc/fstab file for the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} system. If not specified, 101 a default /etc/fstab file with dummy values is created. 102 103 ${BOLD} -K, --kernel-config FILE${OFF} 104 use the kernel configuration file specified in FILE to build the kernel. 105 if the file is not found, or if not specified, the kernel build is skipped. 106 107 ${BOLD} -M, --run-make${OFF} 108 run make on the generated Makefile 109 110 ${BOLD} -R --rebuild${OFF} 111 clean the build directory before performing any other task. The directory 112 is cleaned only if it was populated by a previous jhalfs run. 113 -EOF- 114 115 [[ ${PROGNAME} = "clfs" ]] && 116 cat <<- -EOF- 117 118 ${BOLD} -A, --arch ARCH ${OFF} 119 Select the TARGET architecture, valid selections are: 120 32bit builds 121 x86, i486, i586, ppc, mips, mipsel, sparc 122 64bit builds 123 x86_64-64, mips64-64, mipsel64-64, sparc64-64, alpha 124 64bit multi-lib 125 x86_64, mips64, mipsel64, sparc64, ppc64 126 127 ${BOLD} --boot-config FILE ${OFF} 128 The configuration file for the bootstrap kernel if method=boot 129 130 ${BOLD} --method BUILDMETHOD ${OFF} 131 Select the build method, chroot or boot 132 -EOF- 133 134 [[ ${PROGNAME} = "clfs2" ]] && 135 cat <<- -EOF- 136 137 ${BOLD} -A, --arch ARCH ${OFF} 138 Select the TARGET architecture, valid selections are: 139 32bit builds 140 arm 141 64bit builds 142 143 64bit multi-lib 144 -EOF- 145 146 [[ ${PROGNAME} = "hlfs" ]] && 147 cat <<- -EOF- 148 149 ${BOLD} --model STYLE ${OFF} 150 Select the library model for the HLFS system 151 Valid choices are: glibc or uclibc 152 -EOF- 153 154 cat <<- -EOF- 155 ${DD_BORDER} 156 -EOF- 157 exit 158 } 159 160 version=" 161 ${BOLD} \"jhalfs\"${OFF} builder tool (development) \$Rev$ 162 \$Date$ 163 164 ${BOLD} \"${PROGNAME}\"${OFF} script module 165 166 Written by George Boudreau, 167 Manuel Canales Esparcia, 168 Jeremy Huntwork 169 170 This program is published under the ${BOLD}Gnu General Public License, Version 2.${OFF} 171 " 5 set -e 172 6 173 7 … … 189 23 } 190 24 191 192 help="${nl_}Try '$0 --help' for more information."193 194 exit_missing_arg="\195 echo \"Option '\$1' requires an argument\" >&2196 echo \"\$help\" >&2197 exit 1"198 25 199 26 HEADER="# This file is automatically generated by jhalfs … … 621 448 cd $JHALFSDIR 622 449 623 if [ -z $W C] ; then450 if [ -z $WORKING_COPY ] ; then 624 451 # Check for Subversion instead of just letting the script hit 'svn' and fail. 625 452 test `type -p svn` || eval "echo \"This feature requires Subversion.\" -
common/func_validate_configs.sh
r3619bc5 r4da2512 2 2 3 3 declare -r dotSTR=".................." 4 5 #----------------------------#6 validate_target() { #7 #----------------------------#8 local -r ERROR_MSG_pt1='The variable \"${L_arrow}TARGET${R_arrow}\" value ${L_arrow}${BOLD}${TARGET}${R_arrow} is invalid for the ${L_arrow}${BOLD}${ARCH}${R_arrow} architecture'9 local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'10 11 local -r PARAM_VALS='TARGET${dotSTR:6} ${L_arrow}${BOLD}${TARGET}${OFF}${R_arrow}'12 local -r PARAM_VALS2='TARGET32${dotSTR:8} ${L_arrow}${BOLD}${TARGET32}${OFF}${R_arrow}'13 14 write_error_and_die() {15 echo -e "\n${DD_BORDER}"16 echo -e "`eval echo ${ERROR_MSG_pt1}`" >&217 echo -e "`eval echo ${ERROR_MSG_pt2}`" >&218 echo -e "${DD_BORDER}\n"19 exit 120 }21 22 if [[ ! "${TARGET32}" = "" ]]; then23 echo -e "`eval echo $PARAM_VALS2`"24 fi25 echo -e "`eval echo $PARAM_VALS`"26 27 case "${ARCH}" in28 "x86") [[ "${TARGET}" = "i486-pc-linux-gnu" ]] && return29 [[ "${TARGET}" = "i586-pc-linux-gnu" ]] && return30 [[ "${TARGET}" = "i686-pc-linux-gnu" ]] && return31 ;;32 "ppc") [[ "${TARGET}" = "powerpc-unknown-linux-gnu" ]] && return33 ;;34 "mips") [[ "${TARGET}" = "mipsel-unknown-linux-gnu" ]] && return35 [[ "${TARGET}" = "mips-unknown-linux-gnu" ]] && return36 ;;37 "sparc") [[ "${TARGET}" = "sparcv9-unknown-linux-gnu" ]] && return38 ;;39 "x86_64-64") [[ "${TARGET}" = "x86_64-unknown-linux-gnu" ]] && return40 ;;41 "mips64-64") [[ "${TARGET}" = "mips64el-unknown-linux-gnu" ]] && return42 [[ "${TARGET}" = "mips64-unknown-linux-gnu" ]] && return43 ;;44 "sparc64-64") [[ "${TARGET}" = "sparc64-unknown-linux-gnu" ]] && return45 ;;46 "alpha") [[ "${TARGET}" = "alpha-unknown-linux-gnu" ]] && return47 ;;48 "x86_64") [[ "${TARGET}" = "x86_64-unknown-linux-gnu" ]] &&49 [[ "${TARGET32}" = "i686-pc-linux-gnu" ]] && return50 ;;51 "mips64") [[ "${TARGET}" = "mips64el-unknown-linux-gnu" ]] &&52 [[ "${TARGET32}" = "mipsel-unknown-linux-gnu" ]] && return53 54 [[ "${TARGET}" = "mips64-unknown-linux-gnu" ]] &&55 [[ "${TARGET32}" = "mips-unknown-linux-gnu" ]] && return56 ;;57 "sparc64") [[ "${TARGET}" = "sparc64-unknown-linux-gnu" ]] &&58 [[ "${TARGET32}" = "sparc-unknown-linux-gnu" ]] && return59 ;;60 "ppc64") [[ "${TARGET}" = "powerpc64-unknown-linux-gnu" ]] &&61 [[ "${TARGET32}" = "powerpc-unknown-linux-gnu" ]] && return62 ;;63 "arm") [[ "${TARGET}" = "arm-unknown-linux-gnu" ]] && return64 ;;65 *) write_error_and_die66 ;;67 esac68 69 # If you end up here then there was an error SO...70 write_error_and_die71 }72 4 73 5 … … 89 21 90 22 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 91 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOSTTEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL LUSER LGROUP"92 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGETTEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"93 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGETOPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"94 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"23 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL LUSER LGROUP" 24 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" 25 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" 26 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" 95 27 local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR" 96 28 … … 110 42 echo -e "${DD_BORDER}\n" 111 43 exit 1 112 }113 114 validate_against_str() {115 # This is the 'regexp' test available in bash-3.0..116 # using it as a poor man's test for substring117 echo -e "`eval echo $PARAM_VALS`"118 if [[ ! "$1" =~ "x${!config_param}x" ]] ; then119 # parameter value entered is no good120 write_error_and_die121 fi122 44 } 123 45 … … 173 95 PARAM_GROUP=${PROGNAME}_PARAM_LIST 174 96 for config_param in ${!PARAM_GROUP}; do 175 # This is a tricky little piece of code.. executes a cmd string.176 97 case $config_param in 177 TIMEZONE) echo -e "`eval echo $PARAM_VALS`" ;; 98 # Allways display this, if found in ${PROGNAME}_PARAM_LIST 99 GETPKG | \ 100 RUNMAKE | \ 101 TEST | \ 102 OPTIMIZE | \ 103 STRIP | \ 104 VIMLANG | \ 105 MODEL | \ 106 METHOD | \ 107 ARCH | \ 108 TARGET | \ 109 GRSECURITY_HOST | \ 110 TIMEZONE | \ 111 PAGE) echo -e "`eval echo $PARAM_VALS`" ;; 178 112 179 # Validate general parameters.. 180 GETPKG) validate_against_str "xnx xyx" ;; 113 # Envvars that depend on other settings to be displayed 181 114 GETKERNEL ) if [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] ; then 182 [[ "$GETPKG" = "y" ]] && validate_against_str "xnx xyx"115 [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" 183 116 fi ;; 184 RUNMAKE) validate_against_str "xnx xyx" ;; 185 REPORT) validate_against_str "xnx xyx" 117 COMPARE) [[ ! "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 118 RUN_ICA) [[ "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 119 RUN_FARCE) [[ "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 120 ITERATIONS) [[ "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 121 BOMB_TEST) [[ ! "$TEST" = "0" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 122 TARGET32) [[ -n "${TARGET32}" ]] && echo -e "`eval echo $PARAM_VALS`" ;; 123 124 # Envars that requires some validation 125 LUSER) echo -e "`eval echo $PARAM_VALS`" 126 [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die 127 ;; 128 LGROUP) echo -e "`eval echo $PARAM_VALS`" 129 [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die 130 ;; 131 REPORT) echo -e "`eval echo $PARAM_VALS`" 186 132 if [[ "${!config_param}" = "y" ]]; then 187 133 if [[ `type -p bc` ]]; then … … 194 140 fi 195 141 fi ;; 196 COMPARE) if [[ ! "$COMPARE" = "y" ]]; then197 validate_against_str "xnx xyx"198 else199 if [[ ! "${RUN_ICA}" = "y" ]] && [[ ! "${RUN_FARCE}" = "y" ]]; then200 echo "${nl_}${DD_BORDER}"201 echo "You have elected to analyse your build but have failed to select a tool." >&2202 echo "Edit /common/config and set ${L_arrow}${BOLD}RUN_ICA${R_arrow} and/or ${L_arrow}${BOLD}RUN_FARCE${R_arrow} to the required values" >&2203 echo "${DD_BORDER}${nl_}"204 exit 1205 fi206 fi ;;207 RUN_ICA) [[ "$COMPARE" = "y" ]] && validate_against_str "xnx xyx" ;;208 RUN_FARCE) [[ "$COMPARE" = "y" ]] && validate_against_str "xnx xyx" ;;209 ITERATIONS) [[ "$COMPARE" = "y" ]] && validate_against_str "x2x x3x x4x x5x" ;;210 TEST) validate_against_str "x0x x1x x2x x3x" ;;211 BOMB_TEST) [[ ! "$TEST" = "0" ]] && validate_against_str "xnx xyx" ;;212 OPTIMIZE) validate_against_str "x0x x1x x2x" ;;213 STRIP) validate_against_str "xnx xyx" ;;214 VIMLANG) validate_against_str "xnx xyx" ;;215 MODEL) validate_against_str "xglibcx xuclibcx" ;;216 PAGE) validate_against_str "xletterx xA4x" ;;217 METHOD) validate_against_str "xchrootx xbootx" ;;218 ARCH) validate_against_str "xx86x xx86_64x xx86_64-64x xsparcx xsparc64x xsparc64-64x xmipsx xmips64x xmips64-64x xppcx xppc64x xalphax xarmx" ;;219 TARGET) validate_target ;;220 LUSER) echo -e "`eval echo $PARAM_VALS`"221 [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die222 ;;223 LGROUP) echo -e "`eval echo $PARAM_VALS`"224 [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die225 ;;226 GRSECURITY_HOST) validate_against_str "xnx xyx" ;;227 142 228 # BOOK validation. Very ugly, need be fixed143 # BOOK validation. Very ugly, need be fixed 229 144 BOOK) if [[ "${WC}" = "1" ]] ; then 230 145 validate_dir -z -d 231 146 else 232 validate_against_str "x${PROGNAME}-${LFSVRS}x"147 echo -e "`eval echo $PARAM_VALS`" 233 148 fi ;; 234 149 235 # Validate directories, testable states:236 # fatal -z -d -w,237 # warning -z+ -w+150 # Validate directories, testable states: 151 # fatal -z -d -w, 152 # warning -z+ -w+ 238 153 SRC_ARCHIVE) [[ "$GETPKG" = "y" ]] && validate_dir -z+ -d -w+ ;; 239 BUILDDIR) # The build directory/partition MUST exist and be writable by the user 240 validate_dir -z -d -w 241 [[ "xx x/x" =~ "x${!config_param}x" ]] && 242 write_error_and_die 243 ;; 154 # The build directory/partition MUST exist and be writable by the user 155 BUILDDIR) validate_dir -z -d -w 156 [[ "xx x/x" =~ "x${!config_param}x" ]] && write_error_and_die ;; 244 157 245 # Validate files, testable states:246 # fatal -z -e -s -w -x -r,247 # warning -z+158 # Validate files, testable states: 159 # fatal -z -e -s -w -x -r, 160 # warning -z+ 248 161 FSTAB) validate_file -z+ -e -s ;; 249 162 CONFIG) validate_file -z+ -e -s ;; 250 163 BOOT_CONFIG) [[ "${METHOD}" = "boot" ]] && validate_file -z -e -s ;; 251 164 252 # Treatment of 'special' parameters165 # Treatment of 'special' parameters 253 166 LANG | \ 254 167 LC_ALL) # See it the locale values exist on this machine … … 267 180 ;; 268 181 269 # BLFS params. No validation is required/allowed, IMHO182 # BLFS params. 270 183 BRANCH_ID | BLFS_ROOT | BLFS_XML ) echo "`eval echo $PARAM_VALS`" ;; 271 184 TRACKING_DIR ) validate_dir -z -d -w ;;
Note:
See TracChangeset
for help on using the changeset viewer.