r3056 - jhalfs/branches/experimental/BLFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu Aug 24 12:29:19 PDT 2006


Author: manuel
Date: 2006-08-24 13:29:18 -0600 (Thu, 24 Aug 2006)
New Revision: 3056

Modified:
   jhalfs/branches/experimental/BLFS/gen_pkg_book.sh
Log:
Added a very basic configuration validation.

Modified: jhalfs/branches/experimental/BLFS/gen_pkg_book.sh
===================================================================
--- jhalfs/branches/experimental/BLFS/gen_pkg_book.sh	2006-08-24 18:49:35 UTC (rev 3055)
+++ jhalfs/branches/experimental/BLFS/gen_pkg_book.sh	2006-08-24 19:29:18 UTC (rev 3056)
@@ -78,7 +78,19 @@
   SUDO=${SUDO:-n}
 }
 
+#--------------------------#
+validate_configuration() { #
+#--------------------------#
+  local -r dotSTR=".................."
+  local -r PARAM_LIST="TARGET DEP_LEVEL SUDO PRINT_SERVER MAIL_SERVER GHOSTSCRIPT KBR5 X11"
+  local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
+  local config_param
 
+  for config_param in ${PARAM_LIST}; do
+    echo -e "`eval echo $PARAM_VALS`"
+  done
+}
+
 #
 # Regenerate the META-package dependencies from the configuration file
 #
@@ -149,6 +161,15 @@
 
 
 parse_configuration
+validate_configuration
+echo "${SD_BORDER}${nl_}"
+echo -n "Are you happy with these settings? yes/no (no): "
+read ANSWER
+if [ x$ANSWER != "xyes" ] ; then
+  echo "${nl_}Rerun make and fix your settings.${nl_}"
+  exit 1
+fi
+echo "${nl_}${SD_BORDER}${nl_}"
 regenerate_deps
 generate_dependency_tree
 generate_TARGET_xml




More information about the alfs-log mailing list