Changeset 740b8c0


Ignore:
Timestamp:
08/24/2006 07:29:18 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
26e1214
Parents:
f694f27
Message:

Added a very basic configuration validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen_pkg_book.sh

    rf694f27 r740b8c0  
    7979}
    8080
     81#--------------------------#
     82validate_configuration() { #
     83#--------------------------#
     84  local -r dotSTR=".................."
     85  local -r PARAM_LIST="TARGET DEP_LEVEL SUDO PRINT_SERVER MAIL_SERVER GHOSTSCRIPT KBR5 X11"
     86  local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
     87  local config_param
     88
     89  for config_param in ${PARAM_LIST}; do
     90    echo -e "`eval echo $PARAM_VALS`"
     91  done
     92}
    8193
    8294#
     
    150162
    151163parse_configuration
     164validate_configuration
     165echo "${SD_BORDER}${nl_}"
     166echo -n "Are you happy with these settings? yes/no (no): "
     167read ANSWER
     168if [ x$ANSWER != "xyes" ] ; then
     169  echo "${nl_}Rerun make and fix your settings.${nl_}"
     170  exit 1
     171fi
     172echo "${nl_}${SD_BORDER}${nl_}"
    152173regenerate_deps
    153174generate_dependency_tree
Note: See TracChangeset for help on using the changeset viewer.